//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension CloudWatchLogs {
    // MARK: Enums

    public enum AnomalyDetectorStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case analyzing = "ANALYZING"
        case deleted = "DELETED"
        case failed = "FAILED"
        case initializing = "INITIALIZING"
        case paused = "PAUSED"
        case training = "TRAINING"
        public var description: String { return self.rawValue }
    }

    public enum DataProtectionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case activated = "ACTIVATED"
        case archived = "ARCHIVED"
        case deleted = "DELETED"
        case disabled = "DISABLED"
        public var description: String { return self.rawValue }
    }

    public enum DeliveryDestinationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cwl = "CWL"
        case fh = "FH"
        case s3 = "S3"
        case xray = "XRAY"
        public var description: String { return self.rawValue }
    }

    public enum Distribution: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case byLogStream = "ByLogStream"
        case random = "Random"
        public var description: String { return self.rawValue }
    }

    public enum EntityRejectionErrorType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case entitySizeTooLarge = "EntitySizeTooLarge"
        case invalidAttributes = "InvalidAttributes"
        case invalidEntity = "InvalidEntity"
        case invalidKeyAttribute = "InvalidKeyAttributes"
        case invalidTypeValue = "InvalidTypeValue"
        case missingRequiredFields = "MissingRequiredFields"
        case unsupportedLogGroupType = "UnsupportedLogGroupType"
        public var description: String { return self.rawValue }
    }

    public enum EvaluationFrequency: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case fifteenMin = "FIFTEEN_MIN"
        case fiveMin = "FIVE_MIN"
        case oneHour = "ONE_HOUR"
        case oneMin = "ONE_MIN"
        case tenMin = "TEN_MIN"
        case thirtyMin = "THIRTY_MIN"
        public var description: String { return self.rawValue }
    }

    public enum EventSource: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awswaf = "AWSWAF"
        case cloudTrail = "CloudTrail"
        case eksAudit = "EKSAudit"
        case route53Resolver = "Route53Resolver"
        case vpcFlow = "VPCFlow"
        public var description: String { return self.rawValue }
    }

    public enum ExportTaskStatusCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelled = "CANCELLED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case pending = "PENDING"
        case pendingCancel = "PENDING_CANCEL"
        case running = "RUNNING"
        public var description: String { return self.rawValue }
    }

    public enum FlattenedElement: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case first = "first"
        case last = "last"
        public var description: String { return self.rawValue }
    }

    public enum IndexSource: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case account = "ACCOUNT"
        case logGroup = "LOG_GROUP"
        public var description: String { return self.rawValue }
    }

    public enum InheritedProperty: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case accountDataProtection = "ACCOUNT_DATA_PROTECTION"
        public var description: String { return self.rawValue }
    }

    public enum IntegrationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case failed = "FAILED"
        case provisioning = "PROVISIONING"
        public var description: String { return self.rawValue }
    }

    public enum IntegrationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case opensearch = "OPENSEARCH"
        public var description: String { return self.rawValue }
    }

    public enum LogGroupClass: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case delivery = "DELIVERY"
        case infrequentAccess = "INFREQUENT_ACCESS"
        case standard = "STANDARD"
        public var description: String { return self.rawValue }
    }

    public enum OCSFVersion: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case v11 = "V1.1"
        public var description: String { return self.rawValue }
    }

    public enum OpenSearchResourceStatusType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case error = "ERROR"
        case notFound = "NOT_FOUND"
        public var description: String { return self.rawValue }
    }

    public enum OrderBy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case lastEventTime = "LastEventTime"
        case logStreamName = "LogStreamName"
        public var description: String { return self.rawValue }
    }

    public enum OutputFormat: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case json = "json"
        case parquet = "parquet"
        case plain = "plain"
        case raw = "raw"
        case w3c = "w3c"
        public var description: String { return self.rawValue }
    }

    public enum PolicyScope: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case account = "ACCOUNT"
        case resource = "RESOURCE"
        public var description: String { return self.rawValue }
    }

    public enum PolicyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case dataProtectionPolicy = "DATA_PROTECTION_POLICY"
        case fieldIndexPolicy = "FIELD_INDEX_POLICY"
        case metricExtractionPolicy = "METRIC_EXTRACTION_POLICY"
        case subscriptionFilterPolicy = "SUBSCRIPTION_FILTER_POLICY"
        case transformerPolicy = "TRANSFORMER_POLICY"
        public var description: String { return self.rawValue }
    }

    public enum QueryLanguage: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cwli = "CWLI"
        case ppl = "PPL"
        case sql = "SQL"
        public var description: String { return self.rawValue }
    }

    public enum QueryStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelled = "Cancelled"
        case complete = "Complete"
        case failed = "Failed"
        case running = "Running"
        case scheduled = "Scheduled"
        case timeout = "Timeout"
        case unknown = "Unknown"
        public var description: String { return self.rawValue }
    }

    public enum Scope: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case all = "ALL"
        public var description: String { return self.rawValue }
    }

    public enum StandardUnit: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bits = "Bits"
        case bitsSecond = "Bits/Second"
        case bytes = "Bytes"
        case bytesSecond = "Bytes/Second"
        case count = "Count"
        case countSecond = "Count/Second"
        case gigabits = "Gigabits"
        case gigabitsSecond = "Gigabits/Second"
        case gigabytes = "Gigabytes"
        case gigabytesSecond = "Gigabytes/Second"
        case kilobits = "Kilobits"
        case kilobitsSecond = "Kilobits/Second"
        case kilobytes = "Kilobytes"
        case kilobytesSecond = "Kilobytes/Second"
        case megabits = "Megabits"
        case megabitsSecond = "Megabits/Second"
        case megabytes = "Megabytes"
        case megabytesSecond = "Megabytes/Second"
        case microseconds = "Microseconds"
        case milliseconds = "Milliseconds"
        case none = "None"
        case percent = "Percent"
        case seconds = "Seconds"
        case terabits = "Terabits"
        case terabitsSecond = "Terabits/Second"
        case terabytes = "Terabytes"
        case terabytesSecond = "Terabytes/Second"
        public var description: String { return self.rawValue }
    }

    public enum State: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "Active"
        case baseline = "Baseline"
        case suppressed = "Suppressed"
        public var description: String { return self.rawValue }
    }

    public enum SuppressionState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case suppressed = "SUPPRESSED"
        case unsuppressed = "UNSUPPRESSED"
        public var description: String { return self.rawValue }
    }

    public enum SuppressionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case infinite = "INFINITE"
        case limited = "LIMITED"
        public var description: String { return self.rawValue }
    }

    public enum SuppressionUnit: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case hours = "HOURS"
        case minutes = "MINUTES"
        case seconds = "SECONDS"
        public var description: String { return self.rawValue }
    }

    public enum `Type`: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case boolean = "boolean"
        case double = "double"
        case integer = "integer"
        case string = "string"
        public var description: String { return self.rawValue }
    }

    public enum GetLogObjectResponseStream: AWSDecodableShape, Sendable {
        case fields(FieldsData)
        /// An internal error occurred during the streaming of log data. This exception is thrown when there's an issue with the internal streaming mechanism used by the GetLogObject operation.
        case internalStreamingException(InternalStreamingException)

        public init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            guard container.allKeys.count == 1, let key = container.allKeys.first else {
                let context = DecodingError.Context(
                    codingPath: container.codingPath,
                    debugDescription: "Expected exactly one key, but got \(container.allKeys.count)"
                )
                throw DecodingError.dataCorrupted(context)
            }
            switch key {
            case .fields:
                let value = try container.decode(FieldsData.self, forKey: .fields)
                self = .fields(value)
            case .internalStreamingException:
                let value = try container.decode(InternalStreamingException.self, forKey: .internalStreamingException)
                self = .internalStreamingException(value)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case fields = "fields"
            case internalStreamingException = "InternalStreamingException"
        }
    }

    public enum StartLiveTailResponseStream: AWSDecodableShape, Sendable {
        /// This object contains information about this Live Tail session, including the log groups included and the log stream filters, if any.
        case sessionStart(LiveTailSessionStart)
        /// This exception is returned if an unknown error occurs.
        case sessionStreamingException(SessionStreamingException)
        /// This exception is returned in the stream when the Live Tail session times out. Live Tail sessions time out after three hours.
        case sessionTimeoutException(SessionTimeoutException)
        /// This object contains the log events and session metadata.
        case sessionUpdate(LiveTailSessionUpdate)

        public init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            guard container.allKeys.count == 1, let key = container.allKeys.first else {
                let context = DecodingError.Context(
                    codingPath: container.codingPath,
                    debugDescription: "Expected exactly one key, but got \(container.allKeys.count)"
                )
                throw DecodingError.dataCorrupted(context)
            }
            switch key {
            case .sessionStart:
                let value = try container.decode(LiveTailSessionStart.self, forKey: .sessionStart)
                self = .sessionStart(value)
            case .sessionStreamingException:
                let value = try container.decode(SessionStreamingException.self, forKey: .sessionStreamingException)
                self = .sessionStreamingException(value)
            case .sessionTimeoutException:
                let value = try container.decode(SessionTimeoutException.self, forKey: .sessionTimeoutException)
                self = .sessionTimeoutException(value)
            case .sessionUpdate:
                let value = try container.decode(LiveTailSessionUpdate.self, forKey: .sessionUpdate)
                self = .sessionUpdate(value)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case sessionStart = "sessionStart"
            case sessionStreamingException = "SessionStreamingException"
            case sessionTimeoutException = "SessionTimeoutException"
            case sessionUpdate = "sessionUpdate"
        }
    }

    // MARK: Shapes

    public struct AccountPolicy: AWSDecodableShape {
        /// The Amazon Web Services account ID that the policy applies to.
        public let accountId: String?
        /// The date and time that this policy was most recently updated.
        public let lastUpdatedTime: Int64?
        /// The policy document for this account policy. The JSON specified in policyDocument can be up to 30,720 characters.
        public let policyDocument: String?
        /// The name of the account policy.
        public let policyName: String?
        /// The type of policy for this account policy.
        public let policyType: PolicyType?
        /// The scope of the account policy.
        public let scope: Scope?
        /// The log group selection criteria that is used for this policy.
        public let selectionCriteria: String?

        @inlinable
        public init(accountId: String? = nil, lastUpdatedTime: Int64? = nil, policyDocument: String? = nil, policyName: String? = nil, policyType: PolicyType? = nil, scope: Scope? = nil, selectionCriteria: String? = nil) {
            self.accountId = accountId
            self.lastUpdatedTime = lastUpdatedTime
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.policyType = policyType
            self.scope = scope
            self.selectionCriteria = selectionCriteria
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
            case lastUpdatedTime = "lastUpdatedTime"
            case policyDocument = "policyDocument"
            case policyName = "policyName"
            case policyType = "policyType"
            case scope = "scope"
            case selectionCriteria = "selectionCriteria"
        }
    }

    public struct AddKeyEntry: AWSEncodableShape & AWSDecodableShape {
        /// The key of the new entry to be added to the log event
        public let key: String
        /// Specifies whether to overwrite the value if the key already exists in the log event. If you omit this, the default is false.
        public let overwriteIfExists: Bool?
        /// The value of the new entry to be added to the log event
        public let value: String

        @inlinable
        public init(key: String, overwriteIfExists: Bool? = nil, value: String) {
            self.key = key
            self.overwriteIfExists = overwriteIfExists
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case overwriteIfExists = "overwriteIfExists"
            case value = "value"
        }
    }

    public struct AddKeys: AWSEncodableShape & AWSDecodableShape {
        /// An array of objects, where each object contains the information about one key to add to the log event.
        public let entries: [AddKeyEntry]

        @inlinable
        public init(entries: [AddKeyEntry]) {
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 5)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "entries"
        }
    }

    public struct Anomaly: AWSDecodableShape {
        /// Specifies whether this anomaly is still ongoing.
        public let active: Bool
        /// The ARN of the anomaly detector that identified this anomaly.
        public let anomalyDetectorArn: String
        /// The unique ID that CloudWatch Logs assigned to this anomaly.
        public let anomalyId: String
        /// A human-readable description of the anomaly. This description is generated by CloudWatch Logs.
        public let description: String
        /// The date and time when the anomaly detector first saw this anomaly. It is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.
        public let firstSeen: Int64
        /// A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were detected at each of those runs. The times are specified in epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.
        public let histogram: [String: Int64]
        /// If this anomaly is suppressed, this field is true if the suppression is because the pattern is suppressed. If false, then only this particular anomaly is suppressed.
        public let isPatternLevelSuppression: Bool?
        /// The date and time when the anomaly detector most recently saw this anomaly. It is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.
        public let lastSeen: Int64
        /// An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
        public let logGroupArnList: [String]
        /// An array of sample log event messages that are considered to be part of this anomaly.
        public let logSamples: [LogEvent]
        /// The ID of the pattern used to help identify this anomaly.
        public let patternId: String
        /// The pattern used to help identify this anomaly, in regular expression format.
        public let patternRegex: String?
        /// The pattern used to help identify this anomaly, in string format.
        public let patternString: String
        /// An array of structures where each structure contains information about one token that makes up the pattern.
        public let patternTokens: [PatternToken]
        /// The priority level of this anomaly, as determined by CloudWatch Logs. Priority is computed based on log severity labels such as FATAL and ERROR and the amount of deviation from the baseline. Possible values are HIGH, MEDIUM, and LOW.
        public let priority: String?
        /// Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is Active. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed. If this behavior is now considered to be normal, the value is Baseline.
        public let state: State
        /// Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.
        public let suppressed: Bool?
        /// If the anomaly is suppressed, this indicates when it was suppressed.
        public let suppressedDate: Int64?
        /// If the anomaly is suppressed, this indicates when the suppression will end. If this value is 0, the anomaly was suppressed with no expiration, with the INFINITE value.
        public let suppressedUntil: Int64?

        @inlinable
        public init(active: Bool, anomalyDetectorArn: String, anomalyId: String, description: String, firstSeen: Int64, histogram: [String: Int64], isPatternLevelSuppression: Bool? = nil, lastSeen: Int64, logGroupArnList: [String], logSamples: [LogEvent], patternId: String, patternRegex: String? = nil, patternString: String, patternTokens: [PatternToken], priority: String? = nil, state: State, suppressed: Bool? = nil, suppressedDate: Int64? = nil, suppressedUntil: Int64? = nil) {
            self.active = active
            self.anomalyDetectorArn = anomalyDetectorArn
            self.anomalyId = anomalyId
            self.description = description
            self.firstSeen = firstSeen
            self.histogram = histogram
            self.isPatternLevelSuppression = isPatternLevelSuppression
            self.lastSeen = lastSeen
            self.logGroupArnList = logGroupArnList
            self.logSamples = logSamples
            self.patternId = patternId
            self.patternRegex = patternRegex
            self.patternString = patternString
            self.patternTokens = patternTokens
            self.priority = priority
            self.state = state
            self.suppressed = suppressed
            self.suppressedDate = suppressedDate
            self.suppressedUntil = suppressedUntil
        }

        private enum CodingKeys: String, CodingKey {
            case active = "active"
            case anomalyDetectorArn = "anomalyDetectorArn"
            case anomalyId = "anomalyId"
            case description = "description"
            case firstSeen = "firstSeen"
            case histogram = "histogram"
            case isPatternLevelSuppression = "isPatternLevelSuppression"
            case lastSeen = "lastSeen"
            case logGroupArnList = "logGroupArnList"
            case logSamples = "logSamples"
            case patternId = "patternId"
            case patternRegex = "patternRegex"
            case patternString = "patternString"
            case patternTokens = "patternTokens"
            case priority = "priority"
            case state = "state"
            case suppressed = "suppressed"
            case suppressedDate = "suppressedDate"
            case suppressedUntil = "suppressedUntil"
        }
    }

    public struct AnomalyDetector: AWSDecodableShape {
        /// The ARN of the anomaly detector.
        public let anomalyDetectorArn: String?
        /// Specifies the current status of the anomaly detector. To pause an anomaly detector, use the enabled parameter in the UpdateLogAnomalyDetector operation.
        public let anomalyDetectorStatus: AnomalyDetectorStatus?
        /// The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined and the anomaly detector model will treat new occurrences of similar event as normal.
        public let anomalyVisibilityTime: Int64?
        /// The date and time when this anomaly detector was created.
        public let creationTimeStamp: Int64?
        /// The name of the anomaly detector.
        public let detectorName: String?
        /// Specifies how often the anomaly detector runs and look for anomalies.
        public let evaluationFrequency: EvaluationFrequency?
        public let filterPattern: String?
        /// The ARN of the KMS key assigned to this anomaly detector, if any.
        public let kmsKeyId: String?
        /// The date and time when this anomaly detector was most recently modified.
        public let lastModifiedTimeStamp: Int64?
        /// A list of the ARNs of the log groups that this anomaly detector watches.
        public let logGroupArnList: [String]?

        @inlinable
        public init(anomalyDetectorArn: String? = nil, anomalyDetectorStatus: AnomalyDetectorStatus? = nil, anomalyVisibilityTime: Int64? = nil, creationTimeStamp: Int64? = nil, detectorName: String? = nil, evaluationFrequency: EvaluationFrequency? = nil, filterPattern: String? = nil, kmsKeyId: String? = nil, lastModifiedTimeStamp: Int64? = nil, logGroupArnList: [String]? = nil) {
            self.anomalyDetectorArn = anomalyDetectorArn
            self.anomalyDetectorStatus = anomalyDetectorStatus
            self.anomalyVisibilityTime = anomalyVisibilityTime
            self.creationTimeStamp = creationTimeStamp
            self.detectorName = detectorName
            self.evaluationFrequency = evaluationFrequency
            self.filterPattern = filterPattern
            self.kmsKeyId = kmsKeyId
            self.lastModifiedTimeStamp = lastModifiedTimeStamp
            self.logGroupArnList = logGroupArnList
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectorArn = "anomalyDetectorArn"
            case anomalyDetectorStatus = "anomalyDetectorStatus"
            case anomalyVisibilityTime = "anomalyVisibilityTime"
            case creationTimeStamp = "creationTimeStamp"
            case detectorName = "detectorName"
            case evaluationFrequency = "evaluationFrequency"
            case filterPattern = "filterPattern"
            case kmsKeyId = "kmsKeyId"
            case lastModifiedTimeStamp = "lastModifiedTimeStamp"
            case logGroupArnList = "logGroupArnList"
        }
    }

    public struct AssociateKmsKeyRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see Amazon Resource Names and Using Symmetric and Asymmetric Keys.
        public let kmsKeyId: String
        /// The name of the log group. In your AssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.
        public let logGroupName: String?
        /// Specifies the target for this operation. You must specify one of the following:   Specify the following ARN to have future GetQueryResults operations in this account encrypt the results with the specified KMS key. Replace REGION and ACCOUNT_ID with your Region and account ID.  arn:aws:logs:REGION:ACCOUNT_ID:query-result:*    Specify the ARN of a log group to have CloudWatch Logs use the KMS key to encrypt log events that are ingested and stored by that log group. The log group ARN must be in the following format. Replace REGION and ACCOUNT_ID with your Region and account ID.  arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME     In your AssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.
        public let resourceIdentifier: String?

        @inlinable
        public init(kmsKeyId: String, logGroupName: String? = nil, resourceIdentifier: String? = nil) {
            self.kmsKeyId = kmsKeyId
            self.logGroupName = logGroupName
            self.resourceIdentifier = resourceIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 256)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.resourceIdentifier, name: "resourceIdentifier", parent: name, max: 2048)
            try self.validate(self.resourceIdentifier, name: "resourceIdentifier", parent: name, min: 1)
            try self.validate(self.resourceIdentifier, name: "resourceIdentifier", parent: name, pattern: "^[\\w+=/:,.@\\-\\*]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "kmsKeyId"
            case logGroupName = "logGroupName"
            case resourceIdentifier = "resourceIdentifier"
        }
    }

    public struct CSV: AWSEncodableShape & AWSDecodableShape {
        /// An array of names to use for the columns in the transformed log event. If you omit this, default column names ([column_1, column_2 ...]) are used.
        public let columns: [String]?
        /// The character used to separate each column in the original comma-separated value log event. If you omit this, the processor looks for the comma , character as the delimiter.
        public let delimiter: String?
        /// The character used used as a text qualifier for a single column of data. If you omit this, the double quotation mark " character is used.
        public let quoteCharacter: String?
        /// The path to the field in the log event that has the comma separated values to be parsed. If you omit this value, the whole log message is processed.
        public let source: String?

        @inlinable
        public init(columns: [String]? = nil, delimiter: String? = nil, quoteCharacter: String? = nil, source: String? = nil) {
            self.columns = columns
            self.delimiter = delimiter
            self.quoteCharacter = quoteCharacter
            self.source = source
        }

        public func validate(name: String) throws {
            try self.columns?.forEach {
                try validate($0, name: "columns[]", parent: name, max: 128)
                try validate($0, name: "columns[]", parent: name, min: 1)
            }
            try self.validate(self.columns, name: "columns", parent: name, max: 100)
            try self.validate(self.delimiter, name: "delimiter", parent: name, max: 2)
            try self.validate(self.delimiter, name: "delimiter", parent: name, min: 1)
            try self.validate(self.quoteCharacter, name: "quoteCharacter", parent: name, max: 1)
            try self.validate(self.quoteCharacter, name: "quoteCharacter", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case columns = "columns"
            case delimiter = "delimiter"
            case quoteCharacter = "quoteCharacter"
            case source = "source"
        }
    }

    public struct CancelExportTaskRequest: AWSEncodableShape {
        /// The ID of the export task.
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 512)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case taskId = "taskId"
        }
    }

    public struct ConfigurationTemplate: AWSDecodableShape {
        /// The action permissions that a caller needs to have to be able to successfully create a delivery source on the desired resource type when calling PutDeliverySource.
        public let allowedActionForAllowVendedLogsDeliveryForResource: String?
        /// The valid values that a caller can use as field delimiters when calling CreateDelivery or UpdateDeliveryConfiguration on a delivery that delivers in Plain, W3C, or Raw format.
        public let allowedFieldDelimiters: [String]?
        /// The allowed fields that a caller can use in the recordFields parameter of a CreateDelivery or UpdateDeliveryConfiguration operation.
        public let allowedFields: [RecordField]?
        /// The list of delivery destination output formats that are supported by this log source.
        public let allowedOutputFormats: [OutputFormat]?
        /// The list of variable fields that can be used in the suffix path of a delivery that delivers to an S3 bucket.
        public let allowedSuffixPathFields: [String]?
        /// A mapping that displays the default value of each property within a delivery's configuration, if it is not specified in the request.
        public let defaultDeliveryConfigValues: ConfigurationTemplateDeliveryConfigValues?
        /// A string specifying which destination type this configuration template applies to.
        public let deliveryDestinationType: DeliveryDestinationType?
        /// A string specifying which log type this configuration template applies to.
        public let logType: String?
        /// A string specifying which resource type this configuration template applies to.
        public let resourceType: String?
        /// A string specifying which service this configuration template applies to. For more information about supported services see Enable logging from Amazon Web Services services..
        public let service: String?

        @inlinable
        public init(allowedActionForAllowVendedLogsDeliveryForResource: String? = nil, allowedFieldDelimiters: [String]? = nil, allowedFields: [RecordField]? = nil, allowedOutputFormats: [OutputFormat]? = nil, allowedSuffixPathFields: [String]? = nil, defaultDeliveryConfigValues: ConfigurationTemplateDeliveryConfigValues? = nil, deliveryDestinationType: DeliveryDestinationType? = nil, logType: String? = nil, resourceType: String? = nil, service: String? = nil) {
            self.allowedActionForAllowVendedLogsDeliveryForResource = allowedActionForAllowVendedLogsDeliveryForResource
            self.allowedFieldDelimiters = allowedFieldDelimiters
            self.allowedFields = allowedFields
            self.allowedOutputFormats = allowedOutputFormats
            self.allowedSuffixPathFields = allowedSuffixPathFields
            self.defaultDeliveryConfigValues = defaultDeliveryConfigValues
            self.deliveryDestinationType = deliveryDestinationType
            self.logType = logType
            self.resourceType = resourceType
            self.service = service
        }

        private enum CodingKeys: String, CodingKey {
            case allowedActionForAllowVendedLogsDeliveryForResource = "allowedActionForAllowVendedLogsDeliveryForResource"
            case allowedFieldDelimiters = "allowedFieldDelimiters"
            case allowedFields = "allowedFields"
            case allowedOutputFormats = "allowedOutputFormats"
            case allowedSuffixPathFields = "allowedSuffixPathFields"
            case defaultDeliveryConfigValues = "defaultDeliveryConfigValues"
            case deliveryDestinationType = "deliveryDestinationType"
            case logType = "logType"
            case resourceType = "resourceType"
            case service = "service"
        }
    }

    public struct ConfigurationTemplateDeliveryConfigValues: AWSDecodableShape {
        /// The default field delimiter that is used in a CreateDelivery operation when the field delimiter is not specified in that operation. The field delimiter is used only when the final output delivery is in Plain, W3C, or Raw format.
        public let fieldDelimiter: String?
        /// The default record fields that will be delivered when a list of record fields is not provided in a CreateDelivery operation.
        public let recordFields: [String]?
        /// The delivery parameters that are used when you create a delivery to a delivery destination that is an S3 Bucket.
        public let s3DeliveryConfiguration: S3DeliveryConfiguration?

        @inlinable
        public init(fieldDelimiter: String? = nil, recordFields: [String]? = nil, s3DeliveryConfiguration: S3DeliveryConfiguration? = nil) {
            self.fieldDelimiter = fieldDelimiter
            self.recordFields = recordFields
            self.s3DeliveryConfiguration = s3DeliveryConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case fieldDelimiter = "fieldDelimiter"
            case recordFields = "recordFields"
            case s3DeliveryConfiguration = "s3DeliveryConfiguration"
        }
    }

    public struct CopyValue: AWSEncodableShape & AWSDecodableShape {
        /// An array of CopyValueEntry objects, where each object contains the information about one field value to copy.
        public let entries: [CopyValueEntry]

        @inlinable
        public init(entries: [CopyValueEntry]) {
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 5)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "entries"
        }
    }

    public struct CopyValueEntry: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is false.
        public let overwriteIfExists: Bool?
        /// The key to copy.
        public let source: String
        /// The key of the field to copy the value to.
        public let target: String

        @inlinable
        public init(overwriteIfExists: Bool? = nil, source: String, target: String) {
            self.overwriteIfExists = overwriteIfExists
            self.source = source
            self.target = target
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
            try self.validate(self.target, name: "target", parent: name, max: 128)
            try self.validate(self.target, name: "target", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case overwriteIfExists = "overwriteIfExists"
            case source = "source"
            case target = "target"
        }
    }

    public struct CreateDeliveryRequest: AWSEncodableShape {
        /// The ARN of the delivery destination to use for this delivery.
        public let deliveryDestinationArn: String
        /// The name of the delivery source to use for this delivery.
        public let deliverySourceName: String
        /// The field delimiter to use between record fields when the final output format of a delivery is in Plain, W3C, or Raw format.
        public let fieldDelimiter: String?
        /// The list of record fields to be delivered to the destination, in order. If the delivery's log source has mandatory fields, they must be included in this list.
        public let recordFields: [String]?
        /// This structure contains parameters that are valid only when the delivery's delivery destination is an S3 bucket.
        public let s3DeliveryConfiguration: S3DeliveryConfiguration?
        /// An optional list of key-value pairs to associate with the resource. For more information about tagging, see Tagging Amazon Web Services resources
        public let tags: [String: String]?

        @inlinable
        public init(deliveryDestinationArn: String, deliverySourceName: String, fieldDelimiter: String? = nil, recordFields: [String]? = nil, s3DeliveryConfiguration: S3DeliveryConfiguration? = nil, tags: [String: String]? = nil) {
            self.deliveryDestinationArn = deliveryDestinationArn
            self.deliverySourceName = deliverySourceName
            self.fieldDelimiter = fieldDelimiter
            self.recordFields = recordFields
            self.s3DeliveryConfiguration = s3DeliveryConfiguration
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.deliverySourceName, name: "deliverySourceName", parent: name, max: 60)
            try self.validate(self.deliverySourceName, name: "deliverySourceName", parent: name, min: 1)
            try self.validate(self.deliverySourceName, name: "deliverySourceName", parent: name, pattern: "^[\\w-]*$")
            try self.validate(self.fieldDelimiter, name: "fieldDelimiter", parent: name, max: 5)
            try self.recordFields?.forEach {
                try validate($0, name: "recordFields[]", parent: name, max: 64)
                try validate($0, name: "recordFields[]", parent: name, min: 1)
            }
            try self.validate(self.recordFields, name: "recordFields", parent: name, max: 128)
            try self.s3DeliveryConfiguration?.validate(name: "\(name).s3DeliveryConfiguration")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestinationArn = "deliveryDestinationArn"
            case deliverySourceName = "deliverySourceName"
            case fieldDelimiter = "fieldDelimiter"
            case recordFields = "recordFields"
            case s3DeliveryConfiguration = "s3DeliveryConfiguration"
            case tags = "tags"
        }
    }

    public struct CreateDeliveryResponse: AWSDecodableShape {
        /// A structure that contains information about the delivery that you just created.
        public let delivery: Delivery?

        @inlinable
        public init(delivery: Delivery? = nil) {
            self.delivery = delivery
        }

        private enum CodingKeys: String, CodingKey {
            case delivery = "delivery"
        }
    }

    public struct CreateExportTaskRequest: AWSEncodableShape {
        /// The name of S3 bucket for the exported log data. The bucket must be in the same Amazon Web Services Region.
        public let destination: String
        /// The prefix used as the start of the key for every object exported. If you don't specify a value, the default is exportedlogs. The length of this parameter must comply with the S3 object key name length limits. The object key name is a sequence of Unicode characters with UTF-8 encoding, and can be up to 1,024 bytes.
        public let destinationPrefix: String?
        /// The start time of the range for the request, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this time are not exported.
        public let from: Int64
        /// The name of the log group.
        public let logGroupName: String
        /// Export only log streams that match the provided prefix. If you don't specify a value, no prefix filter is applied.
        public let logStreamNamePrefix: String?
        /// The name of the export task.
        public let taskName: String?
        /// The end time of the range for the request, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported. You must specify a time that is not earlier than when this log group was created.
        public let to: Int64

        @inlinable
        public init(destination: String, destinationPrefix: String? = nil, from: Int64, logGroupName: String, logStreamNamePrefix: String? = nil, taskName: String? = nil, to: Int64) {
            self.destination = destination
            self.destinationPrefix = destinationPrefix
            self.from = from
            self.logGroupName = logGroupName
            self.logStreamNamePrefix = logStreamNamePrefix
            self.taskName = taskName
            self.to = to
        }

        public func validate(name: String) throws {
            try self.validate(self.destination, name: "destination", parent: name, max: 512)
            try self.validate(self.destination, name: "destination", parent: name, min: 1)
            try self.validate(self.from, name: "from", parent: name, min: 0)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, max: 512)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, min: 1)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.taskName, name: "taskName", parent: name, max: 512)
            try self.validate(self.taskName, name: "taskName", parent: name, min: 1)
            try self.validate(self.to, name: "to", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case destination = "destination"
            case destinationPrefix = "destinationPrefix"
            case from = "from"
            case logGroupName = "logGroupName"
            case logStreamNamePrefix = "logStreamNamePrefix"
            case taskName = "taskName"
            case to = "to"
        }
    }

    public struct CreateExportTaskResponse: AWSDecodableShape {
        /// The ID of the export task.
        public let taskId: String?

        @inlinable
        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId = "taskId"
        }
    }

    public struct CreateLogAnomalyDetectorRequest: AWSEncodableShape {
        /// The number of days to have visibility on an anomaly. After this time period has elapsed for an anomaly, it will be automatically baselined and the anomaly detector will treat new occurrences of a similar anomaly as normal. Therefore, if you do not correct the cause of an anomaly during the time period specified in anomalyVisibilityTime, it will be considered normal going forward and will not be detected as an anomaly.
        public let anomalyVisibilityTime: Int64?
        /// A name for this anomaly detector.
        public let detectorName: String?
        /// Specifies how often the anomaly detector is to run and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then 15 minutes might be a good setting for evaluationFrequency .
        public let evaluationFrequency: EvaluationFrequency?
        /// You can use this parameter to limit the anomaly detection model to examine only log events that match the pattern you specify here. For more information, see Filter and Pattern Syntax.
        public let filterPattern: String?
        /// Optionally assigns a KMS key to secure this anomaly detector and its findings. If a key is assigned, the anomalies found and the model used by this detector are encrypted at rest with the key. If a key is assigned to an anomaly detector, a user must have permissions for both this key and for the anomaly detector to retrieve information about the anomalies that it finds. Make sure the value provided is a valid KMS key ARN. For more information about using a KMS key and to see the required IAM policy, see Use a KMS key with an anomaly detector.
        public let kmsKeyId: String?
        /// An array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN.
        public let logGroupArnList: [String]
        /// An optional list of key-value pairs to associate with the resource. For more information about tagging, see Tagging Amazon Web Services resources
        public let tags: [String: String]?

        @inlinable
        public init(anomalyVisibilityTime: Int64? = nil, detectorName: String? = nil, evaluationFrequency: EvaluationFrequency? = nil, filterPattern: String? = nil, kmsKeyId: String? = nil, logGroupArnList: [String], tags: [String: String]? = nil) {
            self.anomalyVisibilityTime = anomalyVisibilityTime
            self.detectorName = detectorName
            self.evaluationFrequency = evaluationFrequency
            self.filterPattern = filterPattern
            self.kmsKeyId = kmsKeyId
            self.logGroupArnList = logGroupArnList
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.anomalyVisibilityTime, name: "anomalyVisibilityTime", parent: name, max: 90)
            try self.validate(self.anomalyVisibilityTime, name: "anomalyVisibilityTime", parent: name, min: 7)
            try self.validate(self.detectorName, name: "detectorName", parent: name, min: 1)
            try self.validate(self.filterPattern, name: "filterPattern", parent: name, max: 1024)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 256)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, pattern: "^arn:aws[a-z\\-]*:kms:[-a-z0-9]*:[0-9]*:key/[-a-z0-9]*$")
            try self.logGroupArnList.forEach {
                try validate($0, name: "logGroupArnList[]", parent: name, max: 2048)
                try validate($0, name: "logGroupArnList[]", parent: name, min: 1)
                try validate($0, name: "logGroupArnList[]", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            }
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyVisibilityTime = "anomalyVisibilityTime"
            case detectorName = "detectorName"
            case evaluationFrequency = "evaluationFrequency"
            case filterPattern = "filterPattern"
            case kmsKeyId = "kmsKeyId"
            case logGroupArnList = "logGroupArnList"
            case tags = "tags"
        }
    }

    public struct CreateLogAnomalyDetectorResponse: AWSDecodableShape {
        /// The ARN of the log anomaly detector that you just created.
        public let anomalyDetectorArn: String?

        @inlinable
        public init(anomalyDetectorArn: String? = nil) {
            self.anomalyDetectorArn = anomalyDetectorArn
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectorArn = "anomalyDetectorArn"
        }
    }

    public struct CreateLogGroupRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource Names.
        public let kmsKeyId: String?
        /// Use this parameter to specify the log group class for this log group. There are three classes:   The Standard log class supports all CloudWatch Logs features.   The Infrequent Access log class supports a subset of CloudWatch Logs features and incurs lower costs.   Use the Delivery log class only for delivering Lambda logs to store in Amazon S3 or Amazon Data Firehose. Log events in log groups in the Delivery class are kept in CloudWatch Logs for only one day. This log class doesn't offer rich CloudWatch Logs capabilities such as CloudWatch Logs Insights queries.   If you omit this parameter, the default of STANDARD is used.  The value of logGroupClass can't be changed after a log group is created.  For details about the features supported by each class, see Log classes
        public let logGroupClass: LogGroupClass?
        /// A name for the log group.
        public let logGroupName: String
        /// The key-value pairs to use for the tags. You can grant users access to certain log groups while preventing them from accessing other log groups. To do so, tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log group, you must have either the logs:TagResource or logs:TagLogGroup permission. For more information about tagging, see Tagging Amazon Web Services resources. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.
        public let tags: [String: String]?

        @inlinable
        public init(kmsKeyId: String? = nil, logGroupClass: LogGroupClass? = nil, logGroupName: String, tags: [String: String]? = nil) {
            self.kmsKeyId = kmsKeyId
            self.logGroupClass = logGroupClass
            self.logGroupName = logGroupName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 256)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "kmsKeyId"
            case logGroupClass = "logGroupClass"
            case logGroupName = "logGroupName"
            case tags = "tags"
        }
    }

    public struct CreateLogStreamRequest: AWSEncodableShape {
        /// The name of the log group.
        public let logGroupName: String
        /// The name of the log stream.
        public let logStreamName: String

        @inlinable
        public init(logGroupName: String, logStreamName: String) {
            self.logGroupName = logGroupName
            self.logStreamName = logStreamName
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, max: 512)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, min: 1)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, pattern: "^[^:*]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case logStreamName = "logStreamName"
        }
    }

    public struct DataAlreadyAcceptedException: AWSErrorShape {
        public let expectedSequenceToken: String?
        public let message: String?

        @inlinable
        public init(expectedSequenceToken: String? = nil, message: String? = nil) {
            self.expectedSequenceToken = expectedSequenceToken
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case expectedSequenceToken = "expectedSequenceToken"
            case message = "message"
        }
    }

    public struct DateTimeConverter: AWSEncodableShape & AWSDecodableShape {
        /// The locale of the source field. If you omit this, the default of locale.ROOT is used.
        public let locale: String?
        /// A list of patterns to match against the source field.
        public let matchPatterns: [String]
        /// The key to apply the date conversion to.
        public let source: String
        /// The time zone of the source field. If you omit this, the default used is the UTC zone.
        public let sourceTimezone: String?
        /// The JSON field to store the result in.
        public let target: String
        /// The datetime format to use for the converted data in the target field. If you omit this, the default of  yyyy-MM-dd'T'HH:mm:ss.SSS'Z is used.
        public let targetFormat: String?
        /// The time zone of the target field. If you omit this, the default used is the UTC zone.
        public let targetTimezone: String?

        @inlinable
        public init(locale: String? = nil, matchPatterns: [String], source: String, sourceTimezone: String? = nil, target: String, targetFormat: String? = nil, targetTimezone: String? = nil) {
            self.locale = locale
            self.matchPatterns = matchPatterns
            self.source = source
            self.sourceTimezone = sourceTimezone
            self.target = target
            self.targetFormat = targetFormat
            self.targetTimezone = targetTimezone
        }

        public func validate(name: String) throws {
            try self.validate(self.locale, name: "locale", parent: name, min: 1)
            try self.matchPatterns.forEach {
                try validate($0, name: "matchPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.matchPatterns, name: "matchPatterns", parent: name, max: 5)
            try self.validate(self.matchPatterns, name: "matchPatterns", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
            try self.validate(self.sourceTimezone, name: "sourceTimezone", parent: name, min: 1)
            try self.validate(self.target, name: "target", parent: name, max: 128)
            try self.validate(self.target, name: "target", parent: name, min: 1)
            try self.validate(self.targetFormat, name: "targetFormat", parent: name, max: 64)
            try self.validate(self.targetFormat, name: "targetFormat", parent: name, min: 1)
            try self.validate(self.targetTimezone, name: "targetTimezone", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case locale = "locale"
            case matchPatterns = "matchPatterns"
            case source = "source"
            case sourceTimezone = "sourceTimezone"
            case target = "target"
            case targetFormat = "targetFormat"
            case targetTimezone = "targetTimezone"
        }
    }

    public struct DeleteAccountPolicyRequest: AWSEncodableShape {
        /// The name of the policy to delete.
        public let policyName: String
        /// The type of policy to delete.
        public let policyType: PolicyType

        @inlinable
        public init(policyName: String, policyType: PolicyType) {
            self.policyName = policyName
            self.policyType = policyType
        }

        private enum CodingKeys: String, CodingKey {
            case policyName = "policyName"
            case policyType = "policyType"
        }
    }

    public struct DeleteDataProtectionPolicyRequest: AWSEncodableShape {
        /// The name or ARN of the log group that you want to delete the data protection policy for.
        public let logGroupIdentifier: String

        @inlinable
        public init(logGroupIdentifier: String) {
            self.logGroupIdentifier = logGroupIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
        }
    }

    public struct DeleteDeliveryDestinationPolicyRequest: AWSEncodableShape {
        /// The name of the delivery destination that you want to delete the policy for.
        public let deliveryDestinationName: String

        @inlinable
        public init(deliveryDestinationName: String) {
            self.deliveryDestinationName = deliveryDestinationName
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, max: 60)
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, min: 1)
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, pattern: "^[\\w-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestinationName = "deliveryDestinationName"
        }
    }

    public struct DeleteDeliveryDestinationRequest: AWSEncodableShape {
        /// The name of the delivery destination that you want to delete. You can find a list of delivery destination names by using the DescribeDeliveryDestinations operation.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 60)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct DeleteDeliveryRequest: AWSEncodableShape {
        /// The unique ID of the delivery to delete. You can find the ID of a delivery with the DescribeDeliveries operation.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9A-Za-z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
        }
    }

    public struct DeleteDeliverySourceRequest: AWSEncodableShape {
        /// The name of the delivery source that you want to delete.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 60)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct DeleteDestinationRequest: AWSEncodableShape {
        /// The name of the destination.
        public let destinationName: String

        @inlinable
        public init(destinationName: String) {
            self.destinationName = destinationName
        }

        public func validate(name: String) throws {
            try self.validate(self.destinationName, name: "destinationName", parent: name, max: 512)
            try self.validate(self.destinationName, name: "destinationName", parent: name, min: 1)
            try self.validate(self.destinationName, name: "destinationName", parent: name, pattern: "^[^:*]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case destinationName = "destinationName"
        }
    }

    public struct DeleteIndexPolicyRequest: AWSEncodableShape {
        /// The log group to delete the index policy for. You can specify either the name or the ARN of the log group.
        public let logGroupIdentifier: String

        @inlinable
        public init(logGroupIdentifier: String) {
            self.logGroupIdentifier = logGroupIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
        }
    }

    public struct DeleteIndexPolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteIntegrationRequest: AWSEncodableShape {
        /// Specify true to force the deletion of the integration even if vended logs dashboards currently exist. The default is false.
        public let force: Bool?
        /// The name of the integration to delete. To find the name of your integration, use ListIntegrations.
        public let integrationName: String

        @inlinable
        public init(force: Bool? = nil, integrationName: String) {
            self.force = force
            self.integrationName = integrationName
        }

        public func validate(name: String) throws {
            try self.validate(self.integrationName, name: "integrationName", parent: name, max: 50)
            try self.validate(self.integrationName, name: "integrationName", parent: name, min: 1)
            try self.validate(self.integrationName, name: "integrationName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case force = "force"
            case integrationName = "integrationName"
        }
    }

    public struct DeleteIntegrationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteKeys: AWSEncodableShape & AWSDecodableShape {
        /// The list of keys to delete.
        public let withKeys: [String]

        @inlinable
        public init(withKeys: [String]) {
            self.withKeys = withKeys
        }

        public func validate(name: String) throws {
            try self.withKeys.forEach {
                try validate($0, name: "withKeys[]", parent: name, min: 1)
            }
            try self.validate(self.withKeys, name: "withKeys", parent: name, max: 5)
            try self.validate(self.withKeys, name: "withKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case withKeys = "withKeys"
        }
    }

    public struct DeleteLogAnomalyDetectorRequest: AWSEncodableShape {
        /// The ARN of the anomaly detector to delete. You can find the ARNs of log anomaly detectors in your account by using the ListLogAnomalyDetectors operation.
        public let anomalyDetectorArn: String

        @inlinable
        public init(anomalyDetectorArn: String) {
            self.anomalyDetectorArn = anomalyDetectorArn
        }

        public func validate(name: String) throws {
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, min: 1)
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectorArn = "anomalyDetectorArn"
        }
    }

    public struct DeleteLogGroupRequest: AWSEncodableShape {
        /// The name of the log group.
        public let logGroupName: String

        @inlinable
        public init(logGroupName: String) {
            self.logGroupName = logGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
        }
    }

    public struct DeleteLogStreamRequest: AWSEncodableShape {
        /// The name of the log group.
        public let logGroupName: String
        /// The name of the log stream.
        public let logStreamName: String

        @inlinable
        public init(logGroupName: String, logStreamName: String) {
            self.logGroupName = logGroupName
            self.logStreamName = logStreamName
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, max: 512)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, min: 1)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, pattern: "^[^:*]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case logStreamName = "logStreamName"
        }
    }

    public struct DeleteMetricFilterRequest: AWSEncodableShape {
        /// The name of the metric filter.
        public let filterName: String
        /// The name of the log group.
        public let logGroupName: String

        @inlinable
        public init(filterName: String, logGroupName: String) {
            self.filterName = filterName
            self.logGroupName = logGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.filterName, name: "filterName", parent: name, max: 512)
            try self.validate(self.filterName, name: "filterName", parent: name, min: 1)
            try self.validate(self.filterName, name: "filterName", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filterName = "filterName"
            case logGroupName = "logGroupName"
        }
    }

    public struct DeleteQueryDefinitionRequest: AWSEncodableShape {
        /// The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.
        public let queryDefinitionId: String

        @inlinable
        public init(queryDefinitionId: String) {
            self.queryDefinitionId = queryDefinitionId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryDefinitionId, name: "queryDefinitionId", parent: name, max: 256)
            try self.validate(self.queryDefinitionId, name: "queryDefinitionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queryDefinitionId = "queryDefinitionId"
        }
    }

    public struct DeleteQueryDefinitionResponse: AWSDecodableShape {
        /// A value of TRUE indicates that the operation succeeded. FALSE indicates that the operation failed.
        public let success: Bool?

        @inlinable
        public init(success: Bool? = nil) {
            self.success = success
        }

        private enum CodingKeys: String, CodingKey {
            case success = "success"
        }
    }

    public struct DeleteResourcePolicyRequest: AWSEncodableShape {
        /// The expected revision ID of the resource policy. Required when deleting a resource-scoped policy to prevent concurrent modifications.
        public let expectedRevisionId: String?
        /// The name of the policy to be revoked. This parameter is required.
        public let policyName: String?
        /// The ARN of the CloudWatch Logs resource for which the resource policy needs to be deleted
        public let resourceArn: String?

        @inlinable
        public init(expectedRevisionId: String? = nil, policyName: String? = nil, resourceArn: String? = nil) {
            self.expectedRevisionId = expectedRevisionId
            self.policyName = policyName
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case expectedRevisionId = "expectedRevisionId"
            case policyName = "policyName"
            case resourceArn = "resourceArn"
        }
    }

    public struct DeleteRetentionPolicyRequest: AWSEncodableShape {
        /// The name of the log group.
        public let logGroupName: String

        @inlinable
        public init(logGroupName: String) {
            self.logGroupName = logGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
        }
    }

    public struct DeleteSubscriptionFilterRequest: AWSEncodableShape {
        /// The name of the subscription filter.
        public let filterName: String
        /// The name of the log group.
        public let logGroupName: String

        @inlinable
        public init(filterName: String, logGroupName: String) {
            self.filterName = filterName
            self.logGroupName = logGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.filterName, name: "filterName", parent: name, max: 512)
            try self.validate(self.filterName, name: "filterName", parent: name, min: 1)
            try self.validate(self.filterName, name: "filterName", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filterName = "filterName"
            case logGroupName = "logGroupName"
        }
    }

    public struct DeleteTransformerRequest: AWSEncodableShape {
        /// Specify either the name or ARN of the log group to delete the transformer for. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
        public let logGroupIdentifier: String

        @inlinable
        public init(logGroupIdentifier: String) {
            self.logGroupIdentifier = logGroupIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
        }
    }

    public struct Delivery: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that uniquely identifies this delivery.
        public let arn: String?
        /// The ARN of the delivery destination that is associated with this delivery.
        public let deliveryDestinationArn: String?
        /// Displays whether the delivery destination associated with this delivery is CloudWatch Logs, Amazon S3, Firehose, or X-Ray.
        public let deliveryDestinationType: DeliveryDestinationType?
        /// The name of the delivery source that is associated with this delivery.
        public let deliverySourceName: String?
        /// The field delimiter that is used between record fields when the final output format of a delivery is in Plain, W3C, or Raw format.
        public let fieldDelimiter: String?
        /// The unique ID that identifies this delivery in your account.
        public let id: String?
        /// The record fields used in this delivery.
        public let recordFields: [String]?
        /// This structure contains delivery configurations that apply only when the delivery destination resource is an S3 bucket.
        public let s3DeliveryConfiguration: S3DeliveryConfiguration?
        /// The tags that have been assigned to this delivery.
        public let tags: [String: String]?

        @inlinable
        public init(arn: String? = nil, deliveryDestinationArn: String? = nil, deliveryDestinationType: DeliveryDestinationType? = nil, deliverySourceName: String? = nil, fieldDelimiter: String? = nil, id: String? = nil, recordFields: [String]? = nil, s3DeliveryConfiguration: S3DeliveryConfiguration? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.deliveryDestinationArn = deliveryDestinationArn
            self.deliveryDestinationType = deliveryDestinationType
            self.deliverySourceName = deliverySourceName
            self.fieldDelimiter = fieldDelimiter
            self.id = id
            self.recordFields = recordFields
            self.s3DeliveryConfiguration = s3DeliveryConfiguration
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case deliveryDestinationArn = "deliveryDestinationArn"
            case deliveryDestinationType = "deliveryDestinationType"
            case deliverySourceName = "deliverySourceName"
            case fieldDelimiter = "fieldDelimiter"
            case id = "id"
            case recordFields = "recordFields"
            case s3DeliveryConfiguration = "s3DeliveryConfiguration"
            case tags = "tags"
        }
    }

    public struct DeliveryDestination: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that uniquely identifies this delivery destination.
        public let arn: String?
        /// A structure that contains the ARN of the Amazon Web Services resource that will receive the logs.
        public let deliveryDestinationConfiguration: DeliveryDestinationConfiguration?
        /// Displays whether this delivery destination is CloudWatch Logs, Amazon S3, Firehose, or X-Ray.
        public let deliveryDestinationType: DeliveryDestinationType?
        /// The name of this delivery destination.
        public let name: String?
        /// The format of the logs that are sent to this delivery destination.
        public let outputFormat: OutputFormat?
        /// The tags that have been assigned to this delivery destination.
        public let tags: [String: String]?

        @inlinable
        public init(arn: String? = nil, deliveryDestinationConfiguration: DeliveryDestinationConfiguration? = nil, deliveryDestinationType: DeliveryDestinationType? = nil, name: String? = nil, outputFormat: OutputFormat? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.deliveryDestinationConfiguration = deliveryDestinationConfiguration
            self.deliveryDestinationType = deliveryDestinationType
            self.name = name
            self.outputFormat = outputFormat
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case deliveryDestinationConfiguration = "deliveryDestinationConfiguration"
            case deliveryDestinationType = "deliveryDestinationType"
            case name = "name"
            case outputFormat = "outputFormat"
            case tags = "tags"
        }
    }

    public struct DeliveryDestinationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the Amazon Web Services destination that this delivery destination represents. That Amazon Web Services destination can be a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Firehose.
        public let destinationResourceArn: String

        @inlinable
        public init(destinationResourceArn: String) {
            self.destinationResourceArn = destinationResourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case destinationResourceArn = "destinationResourceArn"
        }
    }

    public struct DeliverySource: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that uniquely identifies this delivery source.
        public let arn: String?
        /// The type of log that the source is sending. For valid values for this parameter, see the documentation for the source service.
        public let logType: String?
        /// The unique name of the delivery source.
        public let name: String?
        /// This array contains the ARN of the Amazon Web Services resource that sends logs and is represented by this delivery source. Currently, only one ARN can be in the array.
        public let resourceArns: [String]?
        /// The Amazon Web Services service that is sending logs.
        public let service: String?
        /// The tags that have been assigned to this delivery source.
        public let tags: [String: String]?

        @inlinable
        public init(arn: String? = nil, logType: String? = nil, name: String? = nil, resourceArns: [String]? = nil, service: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.logType = logType
            self.name = name
            self.resourceArns = resourceArns
            self.service = service
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case logType = "logType"
            case name = "name"
            case resourceArns = "resourceArns"
            case service = "service"
            case tags = "tags"
        }
    }

    public struct DescribeAccountPoliciesRequest: AWSEncodableShape {
        /// If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account observability, you can use this to specify the account ID of a source account. If you do, the operation returns the account policy for the specified account. Currently, you can specify only one account ID in this parameter. If you omit this parameter, only the policy in the current account is returned.
        public let accountIdentifiers: [String]?
        /// The token for the next set of items to return. (You received this token from a previous call.)
        public let nextToken: String?
        /// Use this parameter to limit the returned policies to only the policy with the name that you specify.
        public let policyName: String?
        /// Use this parameter to limit the returned policies to only the policies that match the policy type that you specify.
        public let policyType: PolicyType

        @inlinable
        public init(accountIdentifiers: [String]? = nil, nextToken: String? = nil, policyName: String? = nil, policyType: PolicyType) {
            self.accountIdentifiers = accountIdentifiers
            self.nextToken = nextToken
            self.policyName = policyName
            self.policyType = policyType
        }

        public func validate(name: String) throws {
            try self.accountIdentifiers?.forEach {
                try validate($0, name: "accountIdentifiers[]", parent: name, max: 12)
                try validate($0, name: "accountIdentifiers[]", parent: name, min: 12)
                try validate($0, name: "accountIdentifiers[]", parent: name, pattern: "^\\d{12}$")
            }
            try self.validate(self.accountIdentifiers, name: "accountIdentifiers", parent: name, max: 20)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case accountIdentifiers = "accountIdentifiers"
            case nextToken = "nextToken"
            case policyName = "policyName"
            case policyType = "policyType"
        }
    }

    public struct DescribeAccountPoliciesResponse: AWSDecodableShape {
        /// An array of structures that contain information about the CloudWatch Logs account policies that match the specified filters.
        public let accountPolicies: [AccountPolicy]?
        /// The token to use when requesting the next set of items. The token expires after 24 hours.
        public let nextToken: String?

        @inlinable
        public init(accountPolicies: [AccountPolicy]? = nil, nextToken: String? = nil) {
            self.accountPolicies = accountPolicies
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accountPolicies = "accountPolicies"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeConfigurationTemplatesRequest: AWSEncodableShape {
        /// Use this parameter to filter the response to include only the configuration templates that apply to the delivery destination types that you specify here.
        public let deliveryDestinationTypes: [DeliveryDestinationType]?
        /// Use this parameter to limit the number of configuration templates that are returned in the response.
        public let limit: Int?
        /// Use this parameter to filter the response to include only the configuration templates that apply to the log types that you specify here.
        public let logTypes: [String]?
        public let nextToken: String?
        /// Use this parameter to filter the response to include only the configuration templates that apply to the resource types that you specify here.
        public let resourceTypes: [String]?
        /// Use this parameter to filter the response to include only the configuration templates that apply to the Amazon Web Services service that you specify here.
        public let service: String?

        @inlinable
        public init(deliveryDestinationTypes: [DeliveryDestinationType]? = nil, limit: Int? = nil, logTypes: [String]? = nil, nextToken: String? = nil, resourceTypes: [String]? = nil, service: String? = nil) {
            self.deliveryDestinationTypes = deliveryDestinationTypes
            self.limit = limit
            self.logTypes = logTypes
            self.nextToken = nextToken
            self.resourceTypes = resourceTypes
            self.service = service
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryDestinationTypes, name: "deliveryDestinationTypes", parent: name, max: 4)
            try self.validate(self.deliveryDestinationTypes, name: "deliveryDestinationTypes", parent: name, min: 1)
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.logTypes?.forEach {
                try validate($0, name: "logTypes[]", parent: name, max: 255)
                try validate($0, name: "logTypes[]", parent: name, min: 1)
                try validate($0, name: "logTypes[]", parent: name, pattern: "^[\\w]*$")
            }
            try self.validate(self.logTypes, name: "logTypes", parent: name, max: 10)
            try self.validate(self.logTypes, name: "logTypes", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.resourceTypes?.forEach {
                try validate($0, name: "resourceTypes[]", parent: name, max: 255)
                try validate($0, name: "resourceTypes[]", parent: name, min: 1)
                try validate($0, name: "resourceTypes[]", parent: name, pattern: "^[\\w-_]*$")
            }
            try self.validate(self.resourceTypes, name: "resourceTypes", parent: name, max: 10)
            try self.validate(self.resourceTypes, name: "resourceTypes", parent: name, min: 1)
            try self.validate(self.service, name: "service", parent: name, max: 255)
            try self.validate(self.service, name: "service", parent: name, min: 1)
            try self.validate(self.service, name: "service", parent: name, pattern: "^[\\w_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestinationTypes = "deliveryDestinationTypes"
            case limit = "limit"
            case logTypes = "logTypes"
            case nextToken = "nextToken"
            case resourceTypes = "resourceTypes"
            case service = "service"
        }
    }

    public struct DescribeConfigurationTemplatesResponse: AWSDecodableShape {
        /// An array of objects, where each object describes one configuration template that matches the filters that you specified in the request.
        public let configurationTemplates: [ConfigurationTemplate]?
        public let nextToken: String?

        @inlinable
        public init(configurationTemplates: [ConfigurationTemplate]? = nil, nextToken: String? = nil) {
            self.configurationTemplates = configurationTemplates
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case configurationTemplates = "configurationTemplates"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDeliveriesRequest: AWSEncodableShape {
        /// Optionally specify the maximum number of deliveries to return in the response.
        public let limit: Int?
        public let nextToken: String?

        @inlinable
        public init(limit: Int? = nil, nextToken: String? = nil) {
            self.limit = limit
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "limit"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDeliveriesResponse: AWSDecodableShape {
        /// An array of structures. Each structure contains information about one delivery in the account.
        public let deliveries: [Delivery]?
        public let nextToken: String?

        @inlinable
        public init(deliveries: [Delivery]? = nil, nextToken: String? = nil) {
            self.deliveries = deliveries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case deliveries = "deliveries"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDeliveryDestinationsRequest: AWSEncodableShape {
        /// Optionally specify the maximum number of delivery destinations to return in the response.
        public let limit: Int?
        public let nextToken: String?

        @inlinable
        public init(limit: Int? = nil, nextToken: String? = nil) {
            self.limit = limit
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "limit"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDeliveryDestinationsResponse: AWSDecodableShape {
        /// An array of structures. Each structure contains information about one delivery destination in the account.
        public let deliveryDestinations: [DeliveryDestination]?
        public let nextToken: String?

        @inlinable
        public init(deliveryDestinations: [DeliveryDestination]? = nil, nextToken: String? = nil) {
            self.deliveryDestinations = deliveryDestinations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestinations = "deliveryDestinations"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDeliverySourcesRequest: AWSEncodableShape {
        /// Optionally specify the maximum number of delivery sources to return in the response.
        public let limit: Int?
        public let nextToken: String?

        @inlinable
        public init(limit: Int? = nil, nextToken: String? = nil) {
            self.limit = limit
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "limit"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDeliverySourcesResponse: AWSDecodableShape {
        /// An array of structures. Each structure contains information about one delivery source in the account.
        public let deliverySources: [DeliverySource]?
        public let nextToken: String?

        @inlinable
        public init(deliverySources: [DeliverySource]? = nil, nextToken: String? = nil) {
            self.deliverySources = deliverySources
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case deliverySources = "deliverySources"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDestinationsRequest: AWSEncodableShape {
        /// The prefix to match. If you don't specify a value, no prefix filter is applied.
        public let destinationNamePrefix: String?
        /// The maximum number of items returned. If you don't specify a value, the default maximum value of 50 items is used.
        public let limit: Int?
        /// The token for the next set of items to return. (You received this token from a previous call.)
        public let nextToken: String?

        @inlinable
        public init(destinationNamePrefix: String? = nil, limit: Int? = nil, nextToken: String? = nil) {
            self.destinationNamePrefix = destinationNamePrefix
            self.limit = limit
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.destinationNamePrefix, name: "destinationNamePrefix", parent: name, max: 512)
            try self.validate(self.destinationNamePrefix, name: "destinationNamePrefix", parent: name, min: 1)
            try self.validate(self.destinationNamePrefix, name: "destinationNamePrefix", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case destinationNamePrefix = "DestinationNamePrefix"
            case limit = "limit"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDestinationsResponse: AWSDecodableShape {
        /// The destinations.
        public let destinations: [Destination]?
        public let nextToken: String?

        @inlinable
        public init(destinations: [Destination]? = nil, nextToken: String? = nil) {
            self.destinations = destinations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case destinations = "destinations"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeExportTasksRequest: AWSEncodableShape {
        /// The maximum number of items returned. If you don't specify a value, the default is up to 50 items.
        public let limit: Int?
        /// The token for the next set of items to return. (You received this token from a previous call.)
        public let nextToken: String?
        /// The status code of the export task. Specifying a status code filters the results to zero or more export tasks.
        public let statusCode: ExportTaskStatusCode?
        /// The ID of the export task. Specifying a task ID filters the results to one or zero export tasks.
        public let taskId: String?

        @inlinable
        public init(limit: Int? = nil, nextToken: String? = nil, statusCode: ExportTaskStatusCode? = nil, taskId: String? = nil) {
            self.limit = limit
            self.nextToken = nextToken
            self.statusCode = statusCode
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, max: 512)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "limit"
            case nextToken = "nextToken"
            case statusCode = "statusCode"
            case taskId = "taskId"
        }
    }

    public struct DescribeExportTasksResponse: AWSDecodableShape {
        /// The export tasks.
        public let exportTasks: [ExportTask]?
        public let nextToken: String?

        @inlinable
        public init(exportTasks: [ExportTask]? = nil, nextToken: String? = nil) {
            self.exportTasks = exportTasks
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case exportTasks = "exportTasks"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeFieldIndexesRequest: AWSEncodableShape {
        /// An array containing the names or ARNs of the log groups that you want to retrieve field indexes for.
        public let logGroupIdentifiers: [String]
        public let nextToken: String?

        @inlinable
        public init(logGroupIdentifiers: [String], nextToken: String? = nil) {
            self.logGroupIdentifiers = logGroupIdentifiers
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.logGroupIdentifiers.forEach {
                try validate($0, name: "logGroupIdentifiers[]", parent: name, max: 2048)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            }
            try self.validate(self.logGroupIdentifiers, name: "logGroupIdentifiers", parent: name, max: 100)
            try self.validate(self.logGroupIdentifiers, name: "logGroupIdentifiers", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifiers = "logGroupIdentifiers"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeFieldIndexesResponse: AWSDecodableShape {
        /// An array containing the field index information.
        public let fieldIndexes: [FieldIndex]?
        public let nextToken: String?

        @inlinable
        public init(fieldIndexes: [FieldIndex]? = nil, nextToken: String? = nil) {
            self.fieldIndexes = fieldIndexes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case fieldIndexes = "fieldIndexes"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeIndexPoliciesRequest: AWSEncodableShape {
        /// An array containing the name or ARN of the log group that you want to retrieve field index policies for.
        public let logGroupIdentifiers: [String]
        public let nextToken: String?

        @inlinable
        public init(logGroupIdentifiers: [String], nextToken: String? = nil) {
            self.logGroupIdentifiers = logGroupIdentifiers
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.logGroupIdentifiers.forEach {
                try validate($0, name: "logGroupIdentifiers[]", parent: name, max: 2048)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            }
            try self.validate(self.logGroupIdentifiers, name: "logGroupIdentifiers", parent: name, max: 1)
            try self.validate(self.logGroupIdentifiers, name: "logGroupIdentifiers", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifiers = "logGroupIdentifiers"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeIndexPoliciesResponse: AWSDecodableShape {
        /// An array containing the field index policies.
        public let indexPolicies: [IndexPolicy]?
        public let nextToken: String?

        @inlinable
        public init(indexPolicies: [IndexPolicy]? = nil, nextToken: String? = nil) {
            self.indexPolicies = indexPolicies
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexPolicies = "indexPolicies"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeLogGroupsRequest: AWSEncodableShape {
        /// When includeLinkedAccounts is set to true, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.
        public let accountIdentifiers: [String]?
        /// If you are using a monitoring account, set this to true to have the operation return log groups in the accounts listed in accountIdentifiers. If this parameter is set to true and accountIdentifiers contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account.  The default for this parameter is false.
        public let includeLinkedAccounts: Bool?
        /// The maximum number of items returned. If you don't specify a value, the default is up to 50 items.
        public let limit: Int?
        /// Use this parameter to limit the results to only those log groups in the specified log group class. If you omit this parameter, log groups of all classes can be returned. Specifies the log group class for this log group. There are three classes:   The Standard log class supports all CloudWatch Logs features.   The Infrequent Access log class supports a subset of CloudWatch Logs features and incurs lower costs.   Use the Delivery log class only for delivering Lambda logs to store in Amazon S3 or Amazon Data Firehose. Log events in log groups in the Delivery class are kept in CloudWatch Logs for only one day. This log class doesn't offer rich CloudWatch Logs capabilities such as CloudWatch Logs Insights queries.   For details about the features supported by each class, see Log classes
        public let logGroupClass: LogGroupClass?
        /// Use this array to filter the list of log groups returned. If you specify this parameter, the only other filter that you can choose to specify is includeLinkedAccounts. If you are using this operation in a monitoring account, you can specify the ARNs of log groups in source accounts and in the monitoring account itself. If you are using this operation in an account that is not a cross-account monitoring account, you can specify only log group names in the same account as the operation.
        public let logGroupIdentifiers: [String]?
        /// If you specify a string for this parameter, the operation returns only log groups that have names that match the string based on a case-sensitive substring search. For example, if you specify DataLogs, log groups named DataLogs, aws/DataLogs, and GroupDataLogs would match, but datalogs, Data/log/s and Groupdata would not match. If you specify logGroupNamePattern in your request, then only arn, creationTime, and logGroupName are included in the response.    logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these parameters can be passed.
        public let logGroupNamePattern: String?
        /// The prefix to match.   logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these parameters can be passed.
        public let logGroupNamePrefix: String?
        /// The token for the next set of items to return. (You received this token from a previous call.)
        public let nextToken: String?

        @inlinable
        public init(accountIdentifiers: [String]? = nil, includeLinkedAccounts: Bool? = nil, limit: Int? = nil, logGroupClass: LogGroupClass? = nil, logGroupIdentifiers: [String]? = nil, logGroupNamePattern: String? = nil, logGroupNamePrefix: String? = nil, nextToken: String? = nil) {
            self.accountIdentifiers = accountIdentifiers
            self.includeLinkedAccounts = includeLinkedAccounts
            self.limit = limit
            self.logGroupClass = logGroupClass
            self.logGroupIdentifiers = logGroupIdentifiers
            self.logGroupNamePattern = logGroupNamePattern
            self.logGroupNamePrefix = logGroupNamePrefix
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.accountIdentifiers?.forEach {
                try validate($0, name: "accountIdentifiers[]", parent: name, max: 12)
                try validate($0, name: "accountIdentifiers[]", parent: name, min: 12)
                try validate($0, name: "accountIdentifiers[]", parent: name, pattern: "^\\d{12}$")
            }
            try self.validate(self.accountIdentifiers, name: "accountIdentifiers", parent: name, max: 20)
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.logGroupIdentifiers?.forEach {
                try validate($0, name: "logGroupIdentifiers[]", parent: name, max: 2048)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            }
            try self.validate(self.logGroupIdentifiers, name: "logGroupIdentifiers", parent: name, max: 50)
            try self.validate(self.logGroupIdentifiers, name: "logGroupIdentifiers", parent: name, min: 1)
            try self.validate(self.logGroupNamePattern, name: "logGroupNamePattern", parent: name, max: 512)
            try self.validate(self.logGroupNamePattern, name: "logGroupNamePattern", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]*$")
            try self.validate(self.logGroupNamePrefix, name: "logGroupNamePrefix", parent: name, max: 512)
            try self.validate(self.logGroupNamePrefix, name: "logGroupNamePrefix", parent: name, min: 1)
            try self.validate(self.logGroupNamePrefix, name: "logGroupNamePrefix", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case accountIdentifiers = "accountIdentifiers"
            case includeLinkedAccounts = "includeLinkedAccounts"
            case limit = "limit"
            case logGroupClass = "logGroupClass"
            case logGroupIdentifiers = "logGroupIdentifiers"
            case logGroupNamePattern = "logGroupNamePattern"
            case logGroupNamePrefix = "logGroupNamePrefix"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeLogGroupsResponse: AWSDecodableShape {
        /// An array of structures, where each structure contains the information about one log group.
        public let logGroups: [LogGroup]?
        public let nextToken: String?

        @inlinable
        public init(logGroups: [LogGroup]? = nil, nextToken: String? = nil) {
            self.logGroups = logGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case logGroups = "logGroups"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeLogStreamsRequest: AWSEncodableShape {
        /// If the value is true, results are returned in descending order. If the value is to false, results are returned in ascending order. The default value is false.
        public let descending: Bool?
        /// The maximum number of items returned. If you don't specify a value, the default is up to 50 items.
        public let limit: Int?
        /// Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.  You must include either logGroupIdentifier or logGroupName, but not both.
        public let logGroupIdentifier: String?
        /// The name of the log group.  You must include either logGroupIdentifier or logGroupName, but not both.
        public let logGroupName: String?
        /// The prefix to match. If orderBy is LastEventTime, you cannot specify this parameter.
        public let logStreamNamePrefix: String?
        /// The token for the next set of items to return. (You received this token from a previous call.)
        public let nextToken: String?
        /// If the value is LogStreamName, the results are ordered by log stream name. If the value is LastEventTime, the results are ordered by the event time. The default value is LogStreamName. If you order the results by event time, you cannot specify the logStreamNamePrefix parameter.  lastEventTimestamp represents the time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.
        public let orderBy: OrderBy?

        @inlinable
        public init(descending: Bool? = nil, limit: Int? = nil, logGroupIdentifier: String? = nil, logGroupName: String? = nil, logStreamNamePrefix: String? = nil, nextToken: String? = nil, orderBy: OrderBy? = nil) {
            self.descending = descending
            self.limit = limit
            self.logGroupIdentifier = logGroupIdentifier
            self.logGroupName = logGroupName
            self.logStreamNamePrefix = logStreamNamePrefix
            self.nextToken = nextToken
            self.orderBy = orderBy
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, max: 512)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, min: 1)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case descending = "descending"
            case limit = "limit"
            case logGroupIdentifier = "logGroupIdentifier"
            case logGroupName = "logGroupName"
            case logStreamNamePrefix = "logStreamNamePrefix"
            case nextToken = "nextToken"
            case orderBy = "orderBy"
        }
    }

    public struct DescribeLogStreamsResponse: AWSDecodableShape {
        /// The log streams.
        public let logStreams: [LogStream]?
        public let nextToken: String?

        @inlinable
        public init(logStreams: [LogStream]? = nil, nextToken: String? = nil) {
            self.logStreams = logStreams
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case logStreams = "logStreams"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeMetricFiltersRequest: AWSEncodableShape {
        /// The prefix to match. CloudWatch Logs uses the value that you set here only if you also include the logGroupName parameter in your request.
        public let filterNamePrefix: String?
        /// The maximum number of items returned. If you don't specify a value, the default is up to 50 items.
        public let limit: Int?
        /// The name of the log group.
        public let logGroupName: String?
        /// Filters results to include only those with the specified metric name. If you include this parameter in your request, you must also include the metricNamespace parameter.
        public let metricName: String?
        /// Filters results to include only those in the specified namespace. If you include this parameter in your request, you must also include the metricName parameter.
        public let metricNamespace: String?
        /// The token for the next set of items to return. (You received this token from a previous call.)
        public let nextToken: String?

        @inlinable
        public init(filterNamePrefix: String? = nil, limit: Int? = nil, logGroupName: String? = nil, metricName: String? = nil, metricNamespace: String? = nil, nextToken: String? = nil) {
            self.filterNamePrefix = filterNamePrefix
            self.limit = limit
            self.logGroupName = logGroupName
            self.metricName = metricName
            self.metricNamespace = metricNamespace
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.filterNamePrefix, name: "filterNamePrefix", parent: name, max: 512)
            try self.validate(self.filterNamePrefix, name: "filterNamePrefix", parent: name, min: 1)
            try self.validate(self.filterNamePrefix, name: "filterNamePrefix", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.metricName, name: "metricName", parent: name, max: 255)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[^:*$]*$")
            try self.validate(self.metricNamespace, name: "metricNamespace", parent: name, max: 255)
            try self.validate(self.metricNamespace, name: "metricNamespace", parent: name, pattern: "^[^:*$]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filterNamePrefix = "filterNamePrefix"
            case limit = "limit"
            case logGroupName = "logGroupName"
            case metricName = "metricName"
            case metricNamespace = "metricNamespace"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeMetricFiltersResponse: AWSDecodableShape {
        /// The metric filters.
        public let metricFilters: [MetricFilter]?
        public let nextToken: String?

        @inlinable
        public init(metricFilters: [MetricFilter]? = nil, nextToken: String? = nil) {
            self.metricFilters = metricFilters
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case metricFilters = "metricFilters"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeQueriesRequest: AWSEncodableShape {
        /// Limits the returned queries to only those for the specified log group.
        public let logGroupName: String?
        /// Limits the number of returned queries to the specified number.
        public let maxResults: Int?
        public let nextToken: String?
        /// Limits the returned queries to only the queries that use the specified query language.
        public let queryLanguage: QueryLanguage?
        /// Limits the returned queries to only those that have the specified status. Valid values are Cancelled, Complete, Failed, Running, and Scheduled.
        public let status: QueryStatus?

        @inlinable
        public init(logGroupName: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, queryLanguage: QueryLanguage? = nil, status: QueryStatus? = nil) {
            self.logGroupName = logGroupName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queryLanguage = queryLanguage
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case queryLanguage = "queryLanguage"
            case status = "status"
        }
    }

    public struct DescribeQueriesResponse: AWSDecodableShape {
        public let nextToken: String?
        /// The list of queries that match the request.
        public let queries: [QueryInfo]?

        @inlinable
        public init(nextToken: String? = nil, queries: [QueryInfo]? = nil) {
            self.nextToken = nextToken
            self.queries = queries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case queries = "queries"
        }
    }

    public struct DescribeQueryDefinitionsRequest: AWSEncodableShape {
        /// Limits the number of returned query definitions to the specified number.
        public let maxResults: Int?
        public let nextToken: String?
        /// Use this parameter to filter your results to only the query definitions that have names that start with the prefix you specify.
        public let queryDefinitionNamePrefix: String?
        /// The query language used for this query. For more information about the query languages that CloudWatch Logs supports, see Supported query languages.
        public let queryLanguage: QueryLanguage?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, queryDefinitionNamePrefix: String? = nil, queryLanguage: QueryLanguage? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queryDefinitionNamePrefix = queryDefinitionNamePrefix
            self.queryLanguage = queryLanguage
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.queryDefinitionNamePrefix, name: "queryDefinitionNamePrefix", parent: name, max: 255)
            try self.validate(self.queryDefinitionNamePrefix, name: "queryDefinitionNamePrefix", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case queryDefinitionNamePrefix = "queryDefinitionNamePrefix"
            case queryLanguage = "queryLanguage"
        }
    }

    public struct DescribeQueryDefinitionsResponse: AWSDecodableShape {
        public let nextToken: String?
        /// The list of query definitions that match your request.
        public let queryDefinitions: [QueryDefinition]?

        @inlinable
        public init(nextToken: String? = nil, queryDefinitions: [QueryDefinition]? = nil) {
            self.nextToken = nextToken
            self.queryDefinitions = queryDefinitions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case queryDefinitions = "queryDefinitions"
        }
    }

    public struct DescribeResourcePoliciesRequest: AWSEncodableShape {
        /// The maximum number of resource policies to be displayed with one call of this API.
        public let limit: Int?
        public let nextToken: String?
        /// Specifies the scope of the resource policy. Valid values are ACCOUNT or RESOURCE. When not specified, defaults to ACCOUNT.
        public let policyScope: PolicyScope?
        /// The ARN of the CloudWatch Logs resource for which to query the resource policy.
        public let resourceArn: String?

        @inlinable
        public init(limit: Int? = nil, nextToken: String? = nil, policyScope: PolicyScope? = nil, resourceArn: String? = nil) {
            self.limit = limit
            self.nextToken = nextToken
            self.policyScope = policyScope
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "limit"
            case nextToken = "nextToken"
            case policyScope = "policyScope"
            case resourceArn = "resourceArn"
        }
    }

    public struct DescribeResourcePoliciesResponse: AWSDecodableShape {
        public let nextToken: String?
        /// The resource policies that exist in this account.
        public let resourcePolicies: [ResourcePolicy]?

        @inlinable
        public init(nextToken: String? = nil, resourcePolicies: [ResourcePolicy]? = nil) {
            self.nextToken = nextToken
            self.resourcePolicies = resourcePolicies
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case resourcePolicies = "resourcePolicies"
        }
    }

    public struct DescribeSubscriptionFiltersRequest: AWSEncodableShape {
        /// The prefix to match. If you don't specify a value, no prefix filter is applied.
        public let filterNamePrefix: String?
        /// The maximum number of items returned. If you don't specify a value, the default is up to 50 items.
        public let limit: Int?
        /// The name of the log group.
        public let logGroupName: String
        /// The token for the next set of items to return. (You received this token from a previous call.)
        public let nextToken: String?

        @inlinable
        public init(filterNamePrefix: String? = nil, limit: Int? = nil, logGroupName: String, nextToken: String? = nil) {
            self.filterNamePrefix = filterNamePrefix
            self.limit = limit
            self.logGroupName = logGroupName
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.filterNamePrefix, name: "filterNamePrefix", parent: name, max: 512)
            try self.validate(self.filterNamePrefix, name: "filterNamePrefix", parent: name, min: 1)
            try self.validate(self.filterNamePrefix, name: "filterNamePrefix", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filterNamePrefix = "filterNamePrefix"
            case limit = "limit"
            case logGroupName = "logGroupName"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeSubscriptionFiltersResponse: AWSDecodableShape {
        public let nextToken: String?
        /// The subscription filters.
        public let subscriptionFilters: [SubscriptionFilter]?

        @inlinable
        public init(nextToken: String? = nil, subscriptionFilters: [SubscriptionFilter]? = nil) {
            self.nextToken = nextToken
            self.subscriptionFilters = subscriptionFilters
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case subscriptionFilters = "subscriptionFilters"
        }
    }

    public struct Destination: AWSDecodableShape {
        /// An IAM policy document that governs which Amazon Web Services accounts can create subscription filters against this destination.
        public let accessPolicy: String?
        /// The ARN of this destination.
        public let arn: String?
        /// The creation time of the destination, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let creationTime: Int64?
        /// The name of the destination.
        public let destinationName: String?
        /// A role for impersonation, used when delivering log events to the target.
        public let roleArn: String?
        /// The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream).
        public let targetArn: String?

        @inlinable
        public init(accessPolicy: String? = nil, arn: String? = nil, creationTime: Int64? = nil, destinationName: String? = nil, roleArn: String? = nil, targetArn: String? = nil) {
            self.accessPolicy = accessPolicy
            self.arn = arn
            self.creationTime = creationTime
            self.destinationName = destinationName
            self.roleArn = roleArn
            self.targetArn = targetArn
        }

        private enum CodingKeys: String, CodingKey {
            case accessPolicy = "accessPolicy"
            case arn = "arn"
            case creationTime = "creationTime"
            case destinationName = "destinationName"
            case roleArn = "roleArn"
            case targetArn = "targetArn"
        }
    }

    public struct DisassociateKmsKeyRequest: AWSEncodableShape {
        /// The name of the log group. In your DisassociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.
        public let logGroupName: String?
        /// Specifies the target for this operation. You must specify one of the following:   Specify the ARN of a log group to stop having CloudWatch Logs use the KMS key to encrypt log events that are ingested and stored by that log group. After you run this operation, CloudWatch Logs encrypts ingested log events with the default CloudWatch Logs method. The log group ARN must be in the following format. Replace REGION and ACCOUNT_ID with your Region and account ID.  arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME     Specify the following ARN to stop using this key to encrypt the results of future StartQuery operations in this account. Replace REGION and ACCOUNT_ID with your Region and account ID.  arn:aws:logs:REGION:ACCOUNT_ID:query-result:*    In your DisssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.
        public let resourceIdentifier: String?

        @inlinable
        public init(logGroupName: String? = nil, resourceIdentifier: String? = nil) {
            self.logGroupName = logGroupName
            self.resourceIdentifier = resourceIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.resourceIdentifier, name: "resourceIdentifier", parent: name, max: 2048)
            try self.validate(self.resourceIdentifier, name: "resourceIdentifier", parent: name, min: 1)
            try self.validate(self.resourceIdentifier, name: "resourceIdentifier", parent: name, pattern: "^[\\w+=/:,.@\\-\\*]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case resourceIdentifier = "resourceIdentifier"
        }
    }

    public struct Entity: AWSEncodableShape {
        /// Additional attributes of the entity that are not used to specify the identity of the entity. A list of key-value pairs. For details about how to use the attributes, see How to add related information to telemetry in the CloudWatch User Guide.
        public let attributes: [String: String]?
        /// The attributes of the entity which identify the specific entity, as a list of key-value pairs. Entities with the same keyAttributes are considered to be the same entity. There are five allowed attributes (key names): Type, ResourceType, Identifier Name, and Environment. For details about how to use the key attributes, see How to add related information to telemetry in the CloudWatch User Guide.
        public let keyAttributes: [String: String]?

        @inlinable
        public init(attributes: [String: String]? = nil, keyAttributes: [String: String]? = nil) {
            self.attributes = attributes
            self.keyAttributes = keyAttributes
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 256)
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 512)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.validate(self.attributes, name: "attributes", parent: name, max: 10)
            try self.keyAttributes?.forEach {
                try validate($0.key, name: "keyAttributes.key", parent: name, max: 32)
                try validate($0.key, name: "keyAttributes.key", parent: name, min: 1)
                try validate($0.value, name: "keyAttributes[\"\($0.key)\"]", parent: name, max: 512)
                try validate($0.value, name: "keyAttributes[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.validate(self.keyAttributes, name: "keyAttributes", parent: name, max: 4)
            try self.validate(self.keyAttributes, name: "keyAttributes", parent: name, min: 2)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case keyAttributes = "keyAttributes"
        }
    }

    public struct ExportTask: AWSDecodableShape {
        /// The name of the S3 bucket to which the log data was exported.
        public let destination: String?
        /// The prefix that was used as the start of Amazon S3 key for every object exported.
        public let destinationPrefix: String?
        /// Execution information about the export task.
        public let executionInfo: ExportTaskExecutionInfo?
        /// The start time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not exported.
        public let from: Int64?
        /// The name of the log group from which logs data was exported.
        public let logGroupName: String?
        /// The status of the export task.
        public let status: ExportTaskStatus?
        /// The ID of the export task.
        public let taskId: String?
        /// The name of the export task.
        public let taskName: String?
        /// The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.
        public let to: Int64?

        @inlinable
        public init(destination: String? = nil, destinationPrefix: String? = nil, executionInfo: ExportTaskExecutionInfo? = nil, from: Int64? = nil, logGroupName: String? = nil, status: ExportTaskStatus? = nil, taskId: String? = nil, taskName: String? = nil, to: Int64? = nil) {
            self.destination = destination
            self.destinationPrefix = destinationPrefix
            self.executionInfo = executionInfo
            self.from = from
            self.logGroupName = logGroupName
            self.status = status
            self.taskId = taskId
            self.taskName = taskName
            self.to = to
        }

        private enum CodingKeys: String, CodingKey {
            case destination = "destination"
            case destinationPrefix = "destinationPrefix"
            case executionInfo = "executionInfo"
            case from = "from"
            case logGroupName = "logGroupName"
            case status = "status"
            case taskId = "taskId"
            case taskName = "taskName"
            case to = "to"
        }
    }

    public struct ExportTaskExecutionInfo: AWSDecodableShape {
        /// The completion time of the export task, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let completionTime: Int64?
        /// The creation time of the export task, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let creationTime: Int64?

        @inlinable
        public init(completionTime: Int64? = nil, creationTime: Int64? = nil) {
            self.completionTime = completionTime
            self.creationTime = creationTime
        }

        private enum CodingKeys: String, CodingKey {
            case completionTime = "completionTime"
            case creationTime = "creationTime"
        }
    }

    public struct ExportTaskStatus: AWSDecodableShape {
        /// The status code of the export task.
        public let code: ExportTaskStatusCode?
        /// The status message related to the status code.
        public let message: String?

        @inlinable
        public init(code: ExportTaskStatusCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "code"
            case message = "message"
        }
    }

    public struct FieldIndex: AWSDecodableShape {
        /// The string that this field index matches.
        public let fieldIndexName: String?
        /// The time and date of the earliest log event that matches this field index, after the index policy that contains it was created.
        public let firstEventTime: Int64?
        /// The time and date of the most recent log event that matches this field index.
        public let lastEventTime: Int64?
        /// The most recent time that CloudWatch Logs scanned ingested log events to search for this field index to improve the speed of future CloudWatch Logs Insights queries that search for this field index.
        public let lastScanTime: Int64?
        /// If this field index appears in an index policy that applies only to a single log group, the ARN of that log group is displayed here.
        public let logGroupIdentifier: String?

        @inlinable
        public init(fieldIndexName: String? = nil, firstEventTime: Int64? = nil, lastEventTime: Int64? = nil, lastScanTime: Int64? = nil, logGroupIdentifier: String? = nil) {
            self.fieldIndexName = fieldIndexName
            self.firstEventTime = firstEventTime
            self.lastEventTime = lastEventTime
            self.lastScanTime = lastScanTime
            self.logGroupIdentifier = logGroupIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case fieldIndexName = "fieldIndexName"
            case firstEventTime = "firstEventTime"
            case lastEventTime = "lastEventTime"
            case lastScanTime = "lastScanTime"
            case logGroupIdentifier = "logGroupIdentifier"
        }
    }

    public struct FieldsData: AWSDecodableShape {
        /// The actual log data content returned in the streaming response. This contains the fields and values of the log event in a structured format that can be parsed and processed by the client.
        public let data: AWSBase64Data?

        @inlinable
        public init(data: AWSBase64Data? = nil) {
            self.data = data
        }

        private enum CodingKeys: String, CodingKey {
            case data = "data"
        }
    }

    public struct FilterLogEventsRequest: AWSEncodableShape {
        /// The end of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not returned.
        public let endTime: Int64?
        /// The filter pattern to use. For more information, see Filter and Pattern Syntax. If not provided, all the events are matched.
        public let filterPattern: String?
        /// If the value is true, the operation attempts to provide responses that contain events from multiple log streams within the log group, interleaved in a single response. If the value is false, all the matched log events in the first log stream are searched first, then those in the next log stream, and so on.  Important As of June 17, 2019, this parameter is ignored and the value is assumed to be true. The response from this operation always interleaves events from multiple log streams within a log group.
        public let interleaved: Bool?
        /// The maximum number of events to return. The default is 10,000 events.
        public let limit: Int?
        /// Specify either the name or ARN of the log group to view log events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.  You must include either logGroupIdentifier or logGroupName, but not both.
        public let logGroupIdentifier: String?
        /// The name of the log group to search.  You must include either logGroupIdentifier or logGroupName, but not both.
        public let logGroupName: String?
        /// Filters the results to include only events from log streams that have names starting with this prefix. If you specify a value for both logStreamNamePrefix and logStreamNames, the action returns an InvalidParameterException error.
        public let logStreamNamePrefix: String?
        /// Filters the results to only logs from the log streams in this list. If you specify a value for both logStreamNames and logStreamNamePrefix, the action returns an InvalidParameterException error.
        public let logStreamNames: [String]?
        /// The token for the next set of events to return. (You received this token from a previous call.)
        public let nextToken: String?
        /// The start of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not returned.
        public let startTime: Int64?
        /// Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false. To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.
        public let unmask: Bool?

        @inlinable
        public init(endTime: Int64? = nil, filterPattern: String? = nil, limit: Int? = nil, logGroupIdentifier: String? = nil, logGroupName: String? = nil, logStreamNamePrefix: String? = nil, logStreamNames: [String]? = nil, nextToken: String? = nil, startTime: Int64? = nil, unmask: Bool? = nil) {
            self.endTime = endTime
            self.filterPattern = filterPattern
            self.interleaved = nil
            self.limit = limit
            self.logGroupIdentifier = logGroupIdentifier
            self.logGroupName = logGroupName
            self.logStreamNamePrefix = logStreamNamePrefix
            self.logStreamNames = logStreamNames
            self.nextToken = nextToken
            self.startTime = startTime
            self.unmask = unmask
        }

        @available(*, deprecated, message: "Members interleaved have been deprecated")
        @inlinable
        public init(endTime: Int64? = nil, filterPattern: String? = nil, interleaved: Bool? = nil, limit: Int? = nil, logGroupIdentifier: String? = nil, logGroupName: String? = nil, logStreamNamePrefix: String? = nil, logStreamNames: [String]? = nil, nextToken: String? = nil, startTime: Int64? = nil, unmask: Bool? = nil) {
            self.endTime = endTime
            self.filterPattern = filterPattern
            self.interleaved = interleaved
            self.limit = limit
            self.logGroupIdentifier = logGroupIdentifier
            self.logGroupName = logGroupName
            self.logStreamNamePrefix = logStreamNamePrefix
            self.logStreamNames = logStreamNames
            self.nextToken = nextToken
            self.startTime = startTime
            self.unmask = unmask
        }

        public func validate(name: String) throws {
            try self.validate(self.endTime, name: "endTime", parent: name, min: 0)
            try self.validate(self.filterPattern, name: "filterPattern", parent: name, max: 1024)
            try self.validate(self.limit, name: "limit", parent: name, max: 10000)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, max: 512)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, min: 1)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, pattern: "^[^:*]*$")
            try self.logStreamNames?.forEach {
                try validate($0, name: "logStreamNames[]", parent: name, max: 512)
                try validate($0, name: "logStreamNames[]", parent: name, min: 1)
                try validate($0, name: "logStreamNames[]", parent: name, pattern: "^[^:*]*$")
            }
            try self.validate(self.logStreamNames, name: "logStreamNames", parent: name, max: 100)
            try self.validate(self.logStreamNames, name: "logStreamNames", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.startTime, name: "startTime", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "endTime"
            case filterPattern = "filterPattern"
            case interleaved = "interleaved"
            case limit = "limit"
            case logGroupIdentifier = "logGroupIdentifier"
            case logGroupName = "logGroupName"
            case logStreamNamePrefix = "logStreamNamePrefix"
            case logStreamNames = "logStreamNames"
            case nextToken = "nextToken"
            case startTime = "startTime"
            case unmask = "unmask"
        }
    }

    public struct FilterLogEventsResponse: AWSDecodableShape {
        /// The matched events.
        public let events: [FilteredLogEvent]?
        /// The token to use when requesting the next set of items. The token expires after 24 hours. If the results don't include a nextToken, then pagination is finished.
        public let nextToken: String?
        ///  Important As of May 15, 2020, this parameter is no longer supported. This parameter returns an empty list. Indicates which log streams have been searched and whether each has been searched completely.
        public let searchedLogStreams: [SearchedLogStream]?

        @inlinable
        public init(events: [FilteredLogEvent]? = nil, nextToken: String? = nil, searchedLogStreams: [SearchedLogStream]? = nil) {
            self.events = events
            self.nextToken = nextToken
            self.searchedLogStreams = searchedLogStreams
        }

        private enum CodingKeys: String, CodingKey {
            case events = "events"
            case nextToken = "nextToken"
            case searchedLogStreams = "searchedLogStreams"
        }
    }

    public struct FilteredLogEvent: AWSDecodableShape {
        /// The ID of the event.
        public let eventId: String?
        /// The time the event was ingested, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let ingestionTime: Int64?
        /// The name of the log stream to which this event belongs.
        public let logStreamName: String?
        /// The data contained in the log event.
        public let message: String?
        /// The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let timestamp: Int64?

        @inlinable
        public init(eventId: String? = nil, ingestionTime: Int64? = nil, logStreamName: String? = nil, message: String? = nil, timestamp: Int64? = nil) {
            self.eventId = eventId
            self.ingestionTime = ingestionTime
            self.logStreamName = logStreamName
            self.message = message
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case eventId = "eventId"
            case ingestionTime = "ingestionTime"
            case logStreamName = "logStreamName"
            case message = "message"
            case timestamp = "timestamp"
        }
    }

    public struct GetDataProtectionPolicyRequest: AWSEncodableShape {
        /// The name or ARN of the log group that contains the data protection policy that you want to see.
        public let logGroupIdentifier: String

        @inlinable
        public init(logGroupIdentifier: String) {
            self.logGroupIdentifier = logGroupIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
        }
    }

    public struct GetDataProtectionPolicyResponse: AWSDecodableShape {
        /// The date and time that this policy was most recently updated.
        public let lastUpdatedTime: Int64?
        /// The log group name or ARN that you specified in your request.
        public let logGroupIdentifier: String?
        /// The data protection policy document for this log group.
        public let policyDocument: String?

        @inlinable
        public init(lastUpdatedTime: Int64? = nil, logGroupIdentifier: String? = nil, policyDocument: String? = nil) {
            self.lastUpdatedTime = lastUpdatedTime
            self.logGroupIdentifier = logGroupIdentifier
            self.policyDocument = policyDocument
        }

        private enum CodingKeys: String, CodingKey {
            case lastUpdatedTime = "lastUpdatedTime"
            case logGroupIdentifier = "logGroupIdentifier"
            case policyDocument = "policyDocument"
        }
    }

    public struct GetDeliveryDestinationPolicyRequest: AWSEncodableShape {
        /// The name of the delivery destination that you want to retrieve the policy of.
        public let deliveryDestinationName: String

        @inlinable
        public init(deliveryDestinationName: String) {
            self.deliveryDestinationName = deliveryDestinationName
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, max: 60)
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, min: 1)
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, pattern: "^[\\w-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestinationName = "deliveryDestinationName"
        }
    }

    public struct GetDeliveryDestinationPolicyResponse: AWSDecodableShape {
        /// The IAM policy for this delivery destination.
        public let policy: Policy?

        @inlinable
        public init(policy: Policy? = nil) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "policy"
        }
    }

    public struct GetDeliveryDestinationRequest: AWSEncodableShape {
        /// The name of the delivery destination that you want to retrieve.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 60)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct GetDeliveryDestinationResponse: AWSDecodableShape {
        /// A structure containing information about the delivery destination.
        public let deliveryDestination: DeliveryDestination?

        @inlinable
        public init(deliveryDestination: DeliveryDestination? = nil) {
            self.deliveryDestination = deliveryDestination
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestination = "deliveryDestination"
        }
    }

    public struct GetDeliveryRequest: AWSEncodableShape {
        /// The ID of the delivery that you want to retrieve.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9A-Za-z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
        }
    }

    public struct GetDeliveryResponse: AWSDecodableShape {
        /// A structure that contains information about the delivery.
        public let delivery: Delivery?

        @inlinable
        public init(delivery: Delivery? = nil) {
            self.delivery = delivery
        }

        private enum CodingKeys: String, CodingKey {
            case delivery = "delivery"
        }
    }

    public struct GetDeliverySourceRequest: AWSEncodableShape {
        /// The name of the delivery source that you want to retrieve.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 60)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct GetDeliverySourceResponse: AWSDecodableShape {
        /// A structure containing information about the delivery source.
        public let deliverySource: DeliverySource?

        @inlinable
        public init(deliverySource: DeliverySource? = nil) {
            self.deliverySource = deliverySource
        }

        private enum CodingKeys: String, CodingKey {
            case deliverySource = "deliverySource"
        }
    }

    public struct GetIntegrationRequest: AWSEncodableShape {
        /// The name of the integration that you want to find information about. To find the name of your integration, use ListIntegrations
        public let integrationName: String

        @inlinable
        public init(integrationName: String) {
            self.integrationName = integrationName
        }

        public func validate(name: String) throws {
            try self.validate(self.integrationName, name: "integrationName", parent: name, max: 50)
            try self.validate(self.integrationName, name: "integrationName", parent: name, min: 1)
            try self.validate(self.integrationName, name: "integrationName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case integrationName = "integrationName"
        }
    }

    public struct GetIntegrationResponse: AWSDecodableShape {
        /// A structure that contains information about the integration configuration. For an integration with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, and policies.
        public let integrationDetails: IntegrationDetails?
        /// The name of the integration.
        public let integrationName: String?
        /// The current status of this integration.
        public let integrationStatus: IntegrationStatus?
        /// The type of integration. Integrations with OpenSearch Service have the type OPENSEARCH.
        public let integrationType: IntegrationType?

        @inlinable
        public init(integrationDetails: IntegrationDetails? = nil, integrationName: String? = nil, integrationStatus: IntegrationStatus? = nil, integrationType: IntegrationType? = nil) {
            self.integrationDetails = integrationDetails
            self.integrationName = integrationName
            self.integrationStatus = integrationStatus
            self.integrationType = integrationType
        }

        private enum CodingKeys: String, CodingKey {
            case integrationDetails = "integrationDetails"
            case integrationName = "integrationName"
            case integrationStatus = "integrationStatus"
            case integrationType = "integrationType"
        }
    }

    public struct GetLogAnomalyDetectorRequest: AWSEncodableShape {
        /// The ARN of the anomaly detector to retrieve information about. You can find the ARNs of log anomaly detectors in your account by using the ListLogAnomalyDetectors operation.
        public let anomalyDetectorArn: String

        @inlinable
        public init(anomalyDetectorArn: String) {
            self.anomalyDetectorArn = anomalyDetectorArn
        }

        public func validate(name: String) throws {
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, min: 1)
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectorArn = "anomalyDetectorArn"
        }
    }

    public struct GetLogAnomalyDetectorResponse: AWSDecodableShape {
        /// Specifies whether the anomaly detector is currently active. To change its status, use the enabled parameter in the UpdateLogAnomalyDetector operation.
        public let anomalyDetectorStatus: AnomalyDetectorStatus?
        /// The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined and the anomaly detector model will treat new occurrences of similar event as normal.
        public let anomalyVisibilityTime: Int64?
        /// The date and time when this anomaly detector was created.
        public let creationTimeStamp: Int64?
        /// The name of the log anomaly detector
        public let detectorName: String?
        /// Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then setting evaluationFrequency to FIFTEEN_MIN might be appropriate.
        public let evaluationFrequency: EvaluationFrequency?
        public let filterPattern: String?
        /// The ARN of the KMS key assigned to this anomaly detector, if any.
        public let kmsKeyId: String?
        /// The date and time when this anomaly detector was most recently modified.
        public let lastModifiedTimeStamp: Int64?
        /// An array of structures, where each structure contains the ARN of a log group associated with this anomaly detector.
        public let logGroupArnList: [String]?

        @inlinable
        public init(anomalyDetectorStatus: AnomalyDetectorStatus? = nil, anomalyVisibilityTime: Int64? = nil, creationTimeStamp: Int64? = nil, detectorName: String? = nil, evaluationFrequency: EvaluationFrequency? = nil, filterPattern: String? = nil, kmsKeyId: String? = nil, lastModifiedTimeStamp: Int64? = nil, logGroupArnList: [String]? = nil) {
            self.anomalyDetectorStatus = anomalyDetectorStatus
            self.anomalyVisibilityTime = anomalyVisibilityTime
            self.creationTimeStamp = creationTimeStamp
            self.detectorName = detectorName
            self.evaluationFrequency = evaluationFrequency
            self.filterPattern = filterPattern
            self.kmsKeyId = kmsKeyId
            self.lastModifiedTimeStamp = lastModifiedTimeStamp
            self.logGroupArnList = logGroupArnList
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectorStatus = "anomalyDetectorStatus"
            case anomalyVisibilityTime = "anomalyVisibilityTime"
            case creationTimeStamp = "creationTimeStamp"
            case detectorName = "detectorName"
            case evaluationFrequency = "evaluationFrequency"
            case filterPattern = "filterPattern"
            case kmsKeyId = "kmsKeyId"
            case lastModifiedTimeStamp = "lastModifiedTimeStamp"
            case logGroupArnList = "logGroupArnList"
        }
    }

    public struct GetLogEventsRequest: AWSEncodableShape {
        /// The end of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later than this time are not included.
        public let endTime: Int64?
        /// The maximum number of log events returned. If you don't specify a limit, the default is as many log events as can fit in a response size of 1 MB (up to 10,000 log events).
        public let limit: Int?
        /// Specify either the name or ARN of the log group to view events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.  You must include either logGroupIdentifier or logGroupName, but not both.
        public let logGroupIdentifier: String?
        /// The name of the log group.  You must include either logGroupIdentifier or logGroupName, but not both.
        public let logGroupName: String?
        /// The name of the log stream.
        public let logStreamName: String
        /// The token for the next set of items to return. (You received this token from a previous call.)
        public let nextToken: String?
        /// If the value is true, the earliest log events are returned first. If the value is false, the latest log events are returned first. The default value is false. If you are using a previous nextForwardToken value as the nextToken in this operation, you must specify true for startFromHead.
        public let startFromHead: Bool?
        /// The start of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this time or later than this time are included. Events with a timestamp earlier than this time are not included.
        public let startTime: Int64?
        /// Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false. To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.
        public let unmask: Bool?

        @inlinable
        public init(endTime: Int64? = nil, limit: Int? = nil, logGroupIdentifier: String? = nil, logGroupName: String? = nil, logStreamName: String, nextToken: String? = nil, startFromHead: Bool? = nil, startTime: Int64? = nil, unmask: Bool? = nil) {
            self.endTime = endTime
            self.limit = limit
            self.logGroupIdentifier = logGroupIdentifier
            self.logGroupName = logGroupName
            self.logStreamName = logStreamName
            self.nextToken = nextToken
            self.startFromHead = startFromHead
            self.startTime = startTime
            self.unmask = unmask
        }

        public func validate(name: String) throws {
            try self.validate(self.endTime, name: "endTime", parent: name, min: 0)
            try self.validate(self.limit, name: "limit", parent: name, max: 10000)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, max: 512)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, min: 1)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.startTime, name: "startTime", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "endTime"
            case limit = "limit"
            case logGroupIdentifier = "logGroupIdentifier"
            case logGroupName = "logGroupName"
            case logStreamName = "logStreamName"
            case nextToken = "nextToken"
            case startFromHead = "startFromHead"
            case startTime = "startTime"
            case unmask = "unmask"
        }
    }

    public struct GetLogEventsResponse: AWSDecodableShape {
        /// The events.
        public let events: [OutputLogEvent]?
        /// The token for the next set of items in the backward direction. The token expires after 24 hours. This token is not null. If you have reached the end of the stream, it returns the same token you passed in.
        public let nextBackwardToken: String?
        /// The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.
        public let nextForwardToken: String?

        @inlinable
        public init(events: [OutputLogEvent]? = nil, nextBackwardToken: String? = nil, nextForwardToken: String? = nil) {
            self.events = events
            self.nextBackwardToken = nextBackwardToken
            self.nextForwardToken = nextForwardToken
        }

        private enum CodingKeys: String, CodingKey {
            case events = "events"
            case nextBackwardToken = "nextBackwardToken"
            case nextForwardToken = "nextForwardToken"
        }
    }

    public struct GetLogGroupFieldsRequest: AWSEncodableShape {
        /// Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must specify the ARN.  You must include either logGroupIdentifier or logGroupName, but not both.
        public let logGroupIdentifier: String?
        /// The name of the log group to search.  You must include either logGroupIdentifier or logGroupName, but not both.
        public let logGroupName: String?
        /// The time to set as the center of the query. If you specify time, the 8 minutes before and 8 minutes after this time are searched. If you omit time, the most recent 15 minutes up to the current time are searched. The time value is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.
        public let time: Int64?

        @inlinable
        public init(logGroupIdentifier: String? = nil, logGroupName: String? = nil, time: Int64? = nil) {
            self.logGroupIdentifier = logGroupIdentifier
            self.logGroupName = logGroupName
            self.time = time
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.time, name: "time", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
            case logGroupName = "logGroupName"
            case time = "time"
        }
    }

    public struct GetLogGroupFieldsResponse: AWSDecodableShape {
        /// The array of fields found in the query. Each object in the array contains the name of the field, along with the percentage of time it appeared in the log events that were queried.
        public let logGroupFields: [LogGroupField]?

        @inlinable
        public init(logGroupFields: [LogGroupField]? = nil) {
            self.logGroupFields = logGroupFields
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupFields = "logGroupFields"
        }
    }

    public struct GetLogObjectRequest: AWSEncodableShape {
        /// A pointer to the specific log object to retrieve. This is a required parameter that uniquely identifies the log object within CloudWatch Logs. The pointer is typically obtained from a previous query or filter operation.
        public let logObjectPointer: String
        /// A boolean flag that indicates whether to unmask sensitive log data. When set to true, any masked or redacted data in the log object will be displayed in its original form. Default is false.
        public let unmask: Bool?

        @inlinable
        public init(logObjectPointer: String, unmask: Bool? = nil) {
            self.logObjectPointer = logObjectPointer
            self.unmask = unmask
        }

        public func validate(name: String) throws {
            try self.validate(self.logObjectPointer, name: "logObjectPointer", parent: name, max: 512)
            try self.validate(self.logObjectPointer, name: "logObjectPointer", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logObjectPointer = "logObjectPointer"
            case unmask = "unmask"
        }
    }

    public struct GetLogObjectResponse: AWSDecodableShape {
        /// A stream of structured log data returned by the GetLogObject operation. This stream contains log events with their associated metadata and extracted fields.
        public let fieldStream: AWSEventStream<GetLogObjectResponseStream>?

        @inlinable
        public init(fieldStream: AWSEventStream<GetLogObjectResponseStream>? = nil) {
            self.fieldStream = fieldStream
        }

        public init(from decoder: Decoder) throws {
            let container = try decoder.singleValueContainer()
            self.fieldStream = try container.decode(AWSEventStream<GetLogObjectResponseStream>.self)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetLogRecordRequest: AWSEncodableShape {
        /// The pointer corresponding to the log event record you want to retrieve. You get this from the response of a GetQueryResults operation. In that response, the value of the @ptr field for a log event is the value to use as logRecordPointer to retrieve that complete log event record.
        public let logRecordPointer: String
        /// Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false. To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.
        public let unmask: Bool?

        @inlinable
        public init(logRecordPointer: String, unmask: Bool? = nil) {
            self.logRecordPointer = logRecordPointer
            self.unmask = unmask
        }

        private enum CodingKeys: String, CodingKey {
            case logRecordPointer = "logRecordPointer"
            case unmask = "unmask"
        }
    }

    public struct GetLogRecordResponse: AWSDecodableShape {
        /// The requested log event, as a JSON string.
        public let logRecord: [String: String]?

        @inlinable
        public init(logRecord: [String: String]? = nil) {
            self.logRecord = logRecord
        }

        private enum CodingKeys: String, CodingKey {
            case logRecord = "logRecord"
        }
    }

    public struct GetQueryResultsRequest: AWSEncodableShape {
        /// The ID number of the query.
        public let queryId: String

        @inlinable
        public init(queryId: String) {
            self.queryId = queryId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryId, name: "queryId", parent: name, max: 256)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queryId = "queryId"
        }
    }

    public struct GetQueryResultsResponse: AWSDecodableShape {
        /// If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field displays the ARN of the key that's used to encrypt the query results when StartQuery stores them.
        public let encryptionKey: String?
        /// The query language used for this query. For more information about the query languages that CloudWatch Logs supports, see Supported query languages.
        public let queryLanguage: QueryLanguage?
        /// The log events that matched the query criteria during the most recent time it ran. The results value is an array of arrays. Each log event is one object in the top-level array. Each of these log event objects is an array of field/value pairs.
        public let results: [[ResultField]]?
        /// Includes the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the scanned log events. These values reflect the full raw results of the query.
        public let statistics: QueryStatistics?
        /// The status of the most recent running of the query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, Timeout, and Unknown. Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.
        public let status: QueryStatus?

        @inlinable
        public init(encryptionKey: String? = nil, queryLanguage: QueryLanguage? = nil, results: [[ResultField]]? = nil, statistics: QueryStatistics? = nil, status: QueryStatus? = nil) {
            self.encryptionKey = encryptionKey
            self.queryLanguage = queryLanguage
            self.results = results
            self.statistics = statistics
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionKey = "encryptionKey"
            case queryLanguage = "queryLanguage"
            case results = "results"
            case statistics = "statistics"
            case status = "status"
        }
    }

    public struct GetTransformerRequest: AWSEncodableShape {
        /// Specify either the name or ARN of the log group to return transformer information for. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
        public let logGroupIdentifier: String

        @inlinable
        public init(logGroupIdentifier: String) {
            self.logGroupIdentifier = logGroupIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
        }
    }

    public struct GetTransformerResponse: AWSDecodableShape {
        /// The creation time of the transformer, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let creationTime: Int64?
        /// The date and time when this transformer was most recently modified, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let lastModifiedTime: Int64?
        /// The ARN of the log group that you specified in your request.
        public let logGroupIdentifier: String?
        /// This sructure contains the configuration of the requested transformer.
        public let transformerConfig: [Processor]?

        @inlinable
        public init(creationTime: Int64? = nil, lastModifiedTime: Int64? = nil, logGroupIdentifier: String? = nil, transformerConfig: [Processor]? = nil) {
            self.creationTime = creationTime
            self.lastModifiedTime = lastModifiedTime
            self.logGroupIdentifier = logGroupIdentifier
            self.transformerConfig = transformerConfig
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "creationTime"
            case lastModifiedTime = "lastModifiedTime"
            case logGroupIdentifier = "logGroupIdentifier"
            case transformerConfig = "transformerConfig"
        }
    }

    public struct Grok: AWSEncodableShape & AWSDecodableShape {
        /// The grok pattern to match against the log event. For a list of supported grok patterns, see Supported grok patterns.
        public let match: String
        /// The path to the field in the log event that you want to parse. If you omit this value, the whole log message is parsed.
        public let source: String?

        @inlinable
        public init(match: String, source: String? = nil) {
            self.match = match
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.match, name: "match", parent: name, max: 512)
            try self.validate(self.match, name: "match", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case match = "match"
            case source = "source"
        }
    }

    public struct IndexPolicy: AWSDecodableShape {
        /// The date and time that this index policy was most recently updated.
        public let lastUpdateTime: Int64?
        /// The ARN of the log group that this index policy applies to.
        public let logGroupIdentifier: String?
        /// The policy document for this index policy, in JSON format.
        public let policyDocument: String?
        /// The name of this policy. Responses about log group-level field index policies don't have this field, because those policies don't have names.
        public let policyName: String?
        /// This field indicates whether this is an account-level index policy or an index policy that applies only to a single log group.
        public let source: IndexSource?

        @inlinable
        public init(lastUpdateTime: Int64? = nil, logGroupIdentifier: String? = nil, policyDocument: String? = nil, policyName: String? = nil, source: IndexSource? = nil) {
            self.lastUpdateTime = lastUpdateTime
            self.logGroupIdentifier = logGroupIdentifier
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.source = source
        }

        private enum CodingKeys: String, CodingKey {
            case lastUpdateTime = "lastUpdateTime"
            case logGroupIdentifier = "logGroupIdentifier"
            case policyDocument = "policyDocument"
            case policyName = "policyName"
            case source = "source"
        }
    }

    public struct InputLogEvent: AWSEncodableShape {
        /// The raw event message. Each log event can be no larger than 1 MB.
        public let message: String
        /// The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let timestamp: Int64

        @inlinable
        public init(message: String, timestamp: Int64) {
            self.message = message
            self.timestamp = timestamp
        }

        public func validate(name: String) throws {
            try self.validate(self.message, name: "message", parent: name, min: 1)
            try self.validate(self.timestamp, name: "timestamp", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case timestamp = "timestamp"
        }
    }

    public struct IntegrationSummary: AWSDecodableShape {
        /// The name of this integration.
        public let integrationName: String?
        /// The current status of this integration.
        public let integrationStatus: IntegrationStatus?
        /// The type of integration. Integrations with OpenSearch Service have the type OPENSEARCH.
        public let integrationType: IntegrationType?

        @inlinable
        public init(integrationName: String? = nil, integrationStatus: IntegrationStatus? = nil, integrationType: IntegrationType? = nil) {
            self.integrationName = integrationName
            self.integrationStatus = integrationStatus
            self.integrationType = integrationType
        }

        private enum CodingKeys: String, CodingKey {
            case integrationName = "integrationName"
            case integrationStatus = "integrationStatus"
            case integrationType = "integrationType"
        }
    }

    public struct InternalStreamingException: AWSDecodableShape {
        public let message: String?

        @inlinable
        public init(message: String? = nil) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
        }
    }

    public struct InvalidSequenceTokenException: AWSErrorShape {
        public let expectedSequenceToken: String?
        public let message: String?

        @inlinable
        public init(expectedSequenceToken: String? = nil, message: String? = nil) {
            self.expectedSequenceToken = expectedSequenceToken
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case expectedSequenceToken = "expectedSequenceToken"
            case message = "message"
        }
    }

    public struct ListAnomaliesRequest: AWSEncodableShape {
        /// Use this to optionally limit the results to only the anomalies found by a certain anomaly detector.
        public let anomalyDetectorArn: String?
        /// The maximum number of items to return. If you don't specify a value, the default maximum value of 50 items is used.
        public let limit: Int?
        public let nextToken: String?
        /// You can specify this parameter if you want to the operation to return only anomalies that are currently either suppressed or unsuppressed.
        public let suppressionState: SuppressionState?

        @inlinable
        public init(anomalyDetectorArn: String? = nil, limit: Int? = nil, nextToken: String? = nil, suppressionState: SuppressionState? = nil) {
            self.anomalyDetectorArn = anomalyDetectorArn
            self.limit = limit
            self.nextToken = nextToken
            self.suppressionState = suppressionState
        }

        public func validate(name: String) throws {
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, min: 1)
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectorArn = "anomalyDetectorArn"
            case limit = "limit"
            case nextToken = "nextToken"
            case suppressionState = "suppressionState"
        }
    }

    public struct ListAnomaliesResponse: AWSDecodableShape {
        /// An array of structures, where each structure contains information about one anomaly that a log anomaly detector has found.
        public let anomalies: [Anomaly]?
        public let nextToken: String?

        @inlinable
        public init(anomalies: [Anomaly]? = nil, nextToken: String? = nil) {
            self.anomalies = anomalies
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case anomalies = "anomalies"
            case nextToken = "nextToken"
        }
    }

    public struct ListIntegrationsRequest: AWSEncodableShape {
        /// To limit the results to integrations that start with a certain name prefix, specify that name prefix here.
        public let integrationNamePrefix: String?
        /// To limit the results to integrations with a certain status, specify that status here.
        public let integrationStatus: IntegrationStatus?
        /// To limit the results to integrations of a certain type, specify that type here.
        public let integrationType: IntegrationType?

        @inlinable
        public init(integrationNamePrefix: String? = nil, integrationStatus: IntegrationStatus? = nil, integrationType: IntegrationType? = nil) {
            self.integrationNamePrefix = integrationNamePrefix
            self.integrationStatus = integrationStatus
            self.integrationType = integrationType
        }

        public func validate(name: String) throws {
            try self.validate(self.integrationNamePrefix, name: "integrationNamePrefix", parent: name, max: 50)
            try self.validate(self.integrationNamePrefix, name: "integrationNamePrefix", parent: name, min: 1)
            try self.validate(self.integrationNamePrefix, name: "integrationNamePrefix", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case integrationNamePrefix = "integrationNamePrefix"
            case integrationStatus = "integrationStatus"
            case integrationType = "integrationType"
        }
    }

    public struct ListIntegrationsResponse: AWSDecodableShape {
        /// An array, where each object in the array contains information about one CloudWatch Logs integration in this account.
        public let integrationSummaries: [IntegrationSummary]?

        @inlinable
        public init(integrationSummaries: [IntegrationSummary]? = nil) {
            self.integrationSummaries = integrationSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case integrationSummaries = "integrationSummaries"
        }
    }

    public struct ListLogAnomalyDetectorsRequest: AWSEncodableShape {
        /// Use this to optionally filter the results to only include anomaly detectors that are associated with the specified log group.
        public let filterLogGroupArn: String?
        /// The maximum number of items to return. If you don't specify a value, the default maximum value of 50 items is used.
        public let limit: Int?
        public let nextToken: String?

        @inlinable
        public init(filterLogGroupArn: String? = nil, limit: Int? = nil, nextToken: String? = nil) {
            self.filterLogGroupArn = filterLogGroupArn
            self.limit = limit
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.filterLogGroupArn, name: "filterLogGroupArn", parent: name, max: 2048)
            try self.validate(self.filterLogGroupArn, name: "filterLogGroupArn", parent: name, min: 1)
            try self.validate(self.filterLogGroupArn, name: "filterLogGroupArn", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filterLogGroupArn = "filterLogGroupArn"
            case limit = "limit"
            case nextToken = "nextToken"
        }
    }

    public struct ListLogAnomalyDetectorsResponse: AWSDecodableShape {
        /// An array of structures, where each structure in the array contains information about one anomaly detector.
        public let anomalyDetectors: [AnomalyDetector]?
        public let nextToken: String?

        @inlinable
        public init(anomalyDetectors: [AnomalyDetector]? = nil, nextToken: String? = nil) {
            self.anomalyDetectors = anomalyDetectors
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectors = "anomalyDetectors"
            case nextToken = "nextToken"
        }
    }

    public struct ListLogGroupsForQueryRequest: AWSEncodableShape {
        /// Limits the number of returned log groups to the specified number.
        public let maxResults: Int?
        public let nextToken: String?
        /// The ID of the query to use. This query ID is from the response to your StartQuery operation.
        public let queryId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, queryId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queryId = queryId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 50)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.queryId, name: "queryId", parent: name, max: 256)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case queryId = "queryId"
        }
    }

    public struct ListLogGroupsForQueryResponse: AWSDecodableShape {
        /// An array of the names and ARNs of the log groups that were processed in the query.
        public let logGroupIdentifiers: [String]?
        public let nextToken: String?

        @inlinable
        public init(logGroupIdentifiers: [String]? = nil, nextToken: String? = nil) {
            self.logGroupIdentifiers = logGroupIdentifiers
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifiers = "logGroupIdentifiers"
            case nextToken = "nextToken"
        }
    }

    public struct ListLogGroupsRequest: AWSEncodableShape {
        /// When includeLinkedAccounts is set to true, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.
        public let accountIdentifiers: [String]?
        /// If you are using a monitoring account, set this to true to have the operation return log groups in the accounts listed in accountIdentifiers. If this parameter is set to true and accountIdentifiers contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account.  The default for this parameter is false.
        public let includeLinkedAccounts: Bool?
        /// The maximum number of log groups to return. If you omit this parameter, the default is up to 50 log groups.
        public let limit: Int?
        /// Use this parameter to limit the results to only those log groups in the specified log group class. If you omit this parameter, log groups of all classes can be returned.
        public let logGroupClass: LogGroupClass?
        /// Use this parameter to limit the returned log groups to only those with names that match the pattern that you specify. This parameter is a regular expression that can match prefixes and substrings, and supports wildcard matching and matching multiple patterns, as in the following examples.    Use ^ to match log group names by prefix.   For a substring match, specify the string to match. All matches are case sensitive   To match multiple patterns, separate them with a | as in the example ^/aws/lambda|discovery    You can specify as many as five different regular expression patterns in this field, each of which must be between 3 and 24 characters. You can include the ^ symbol as many as five times, and include the | symbol as many as four times.
        public let logGroupNamePattern: String?
        public let nextToken: String?

        @inlinable
        public init(accountIdentifiers: [String]? = nil, includeLinkedAccounts: Bool? = nil, limit: Int? = nil, logGroupClass: LogGroupClass? = nil, logGroupNamePattern: String? = nil, nextToken: String? = nil) {
            self.accountIdentifiers = accountIdentifiers
            self.includeLinkedAccounts = includeLinkedAccounts
            self.limit = limit
            self.logGroupClass = logGroupClass
            self.logGroupNamePattern = logGroupNamePattern
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.accountIdentifiers?.forEach {
                try validate($0, name: "accountIdentifiers[]", parent: name, max: 12)
                try validate($0, name: "accountIdentifiers[]", parent: name, min: 12)
                try validate($0, name: "accountIdentifiers[]", parent: name, pattern: "^\\d{12}$")
            }
            try self.validate(self.accountIdentifiers, name: "accountIdentifiers", parent: name, max: 20)
            try self.validate(self.limit, name: "limit", parent: name, max: 1000)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.logGroupNamePattern, name: "logGroupNamePattern", parent: name, max: 129)
            try self.validate(self.logGroupNamePattern, name: "logGroupNamePattern", parent: name, min: 3)
            try self.validate(self.logGroupNamePattern, name: "logGroupNamePattern", parent: name, pattern: "^(\\^?[\\.\\-_\\/#A-Za-z0-9]{3,24})(\\|\\^?[\\.\\-_\\/#A-Za-z0-9]{3,24}){0,4}$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case accountIdentifiers = "accountIdentifiers"
            case includeLinkedAccounts = "includeLinkedAccounts"
            case limit = "limit"
            case logGroupClass = "logGroupClass"
            case logGroupNamePattern = "logGroupNamePattern"
            case nextToken = "nextToken"
        }
    }

    public struct ListLogGroupsResponse: AWSDecodableShape {
        /// An array of structures, where each structure contains the information about one log group.
        public let logGroups: [LogGroupSummary]?
        public let nextToken: String?

        @inlinable
        public init(logGroups: [LogGroupSummary]? = nil, nextToken: String? = nil) {
            self.logGroups = logGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case logGroups = "logGroups"
            case nextToken = "nextToken"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The ARN of the resource that you want to view tags for. The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name   The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name   For more information about ARN format, see CloudWatch Logs resources and operations.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^[\\w+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The list of tags associated with the requested resource.>
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct ListTagsLogGroupRequest: AWSEncodableShape {
        /// The name of the log group.
        public let logGroupName: String

        @inlinable
        public init(logGroupName: String) {
            self.logGroupName = logGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
        }
    }

    public struct ListTagsLogGroupResponse: AWSDecodableShape {
        /// The tags for the log group.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct ListToMap: AWSEncodableShape & AWSDecodableShape {
        /// A Boolean value to indicate whether the list will be flattened into single items. Specify true to flatten the list. The default is false
        public let flatten: Bool?
        /// If you set flatten to true, use flattenedElement to specify which element, first or last, to keep.  You must specify this parameter if flatten is true
        public let flattenedElement: FlattenedElement?
        /// The key of the field to be extracted as keys in the generated map
        public let key: String
        /// The key in the log event that has a list of objects that will be converted to a map.
        public let source: String
        /// The key of the field that will hold the generated map
        public let target: String?
        /// If this is specified, the values that you specify in this parameter will be extracted from the source objects and put into the values of the generated map. Otherwise, original objects in the source list will be put into the values of the generated map.
        public let valueKey: String?

        @inlinable
        public init(flatten: Bool? = nil, flattenedElement: FlattenedElement? = nil, key: String, source: String, target: String? = nil, valueKey: String? = nil) {
            self.flatten = flatten
            self.flattenedElement = flattenedElement
            self.key = key
            self.source = source
            self.target = target
            self.valueKey = valueKey
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
            try self.validate(self.target, name: "target", parent: name, max: 128)
            try self.validate(self.target, name: "target", parent: name, min: 1)
            try self.validate(self.valueKey, name: "valueKey", parent: name, max: 128)
            try self.validate(self.valueKey, name: "valueKey", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case flatten = "flatten"
            case flattenedElement = "flattenedElement"
            case key = "key"
            case source = "source"
            case target = "target"
            case valueKey = "valueKey"
        }
    }

    public struct LiveTailSessionLogEvent: AWSDecodableShape {
        /// The timestamp specifying when this log event was ingested into the log group.
        public let ingestionTime: Int64?
        /// The name or ARN of the log group that ingested this log event.
        public let logGroupIdentifier: String?
        /// The name of the log stream that ingested this log event.
        public let logStreamName: String?
        /// The log event message text.
        public let message: String?
        /// The timestamp specifying when this log event was created.
        public let timestamp: Int64?

        @inlinable
        public init(ingestionTime: Int64? = nil, logGroupIdentifier: String? = nil, logStreamName: String? = nil, message: String? = nil, timestamp: Int64? = nil) {
            self.ingestionTime = ingestionTime
            self.logGroupIdentifier = logGroupIdentifier
            self.logStreamName = logStreamName
            self.message = message
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case ingestionTime = "ingestionTime"
            case logGroupIdentifier = "logGroupIdentifier"
            case logStreamName = "logStreamName"
            case message = "message"
            case timestamp = "timestamp"
        }
    }

    public struct LiveTailSessionMetadata: AWSDecodableShape {
        /// If this is true, then more than 500 log events matched the request for this update, and the sessionResults includes a sample of 500 of those events. If this is false, then 500 or fewer log events matched the request for this update, so no sampling was necessary. In this case, the sessionResults array includes all log events that matched your request during this time.
        public let sampled: Bool?

        @inlinable
        public init(sampled: Bool? = nil) {
            self.sampled = sampled
        }

        private enum CodingKeys: String, CodingKey {
            case sampled = "sampled"
        }
    }

    public struct LiveTailSessionStart: AWSDecodableShape {
        /// An optional pattern to filter the results to include only log events that match the pattern. For example, a filter pattern of error 404 displays only log events that include both error and 404. For more information about filter pattern syntax, see Filter and Pattern Syntax.
        public let logEventFilterPattern: String?
        /// An array of the names and ARNs of the log groups included in this Live Tail session.
        public let logGroupIdentifiers: [String]?
        /// If your StartLiveTail operation request included a logStreamNamePrefixes parameter that filtered the session to only include log streams that have names that start with certain prefixes, these prefixes are listed here.
        public let logStreamNamePrefixes: [String]?
        /// If your StartLiveTail operation request included a logStreamNames parameter that filtered the session to only include certain log streams, these streams are listed here.
        public let logStreamNames: [String]?
        /// The unique ID generated by CloudWatch Logs to identify this Live Tail session request.
        public let requestId: String?
        /// The unique ID generated by CloudWatch Logs to identify this Live Tail session.
        public let sessionId: String?

        @inlinable
        public init(logEventFilterPattern: String? = nil, logGroupIdentifiers: [String]? = nil, logStreamNamePrefixes: [String]? = nil, logStreamNames: [String]? = nil, requestId: String? = nil, sessionId: String? = nil) {
            self.logEventFilterPattern = logEventFilterPattern
            self.logGroupIdentifiers = logGroupIdentifiers
            self.logStreamNamePrefixes = logStreamNamePrefixes
            self.logStreamNames = logStreamNames
            self.requestId = requestId
            self.sessionId = sessionId
        }

        private enum CodingKeys: String, CodingKey {
            case logEventFilterPattern = "logEventFilterPattern"
            case logGroupIdentifiers = "logGroupIdentifiers"
            case logStreamNamePrefixes = "logStreamNamePrefixes"
            case logStreamNames = "logStreamNames"
            case requestId = "requestId"
            case sessionId = "sessionId"
        }
    }

    public struct LiveTailSessionUpdate: AWSDecodableShape {
        /// This object contains the session metadata for a Live Tail session.
        public let sessionMetadata: LiveTailSessionMetadata?
        /// An array, where each member of the array includes the information for one log event in the Live Tail session. A sessionResults array can include as many as 500 log events. If the number of log events matching the request exceeds 500 per second, the log events are sampled down to 500 log events to be included in each sessionUpdate structure.
        public let sessionResults: [LiveTailSessionLogEvent]?

        @inlinable
        public init(sessionMetadata: LiveTailSessionMetadata? = nil, sessionResults: [LiveTailSessionLogEvent]? = nil) {
            self.sessionMetadata = sessionMetadata
            self.sessionResults = sessionResults
        }

        private enum CodingKeys: String, CodingKey {
            case sessionMetadata = "sessionMetadata"
            case sessionResults = "sessionResults"
        }
    }

    public struct LogEvent: AWSDecodableShape {
        /// The message content of the log event.
        public let message: String?
        /// The time stamp of the log event.
        public let timestamp: Int64?

        @inlinable
        public init(message: String? = nil, timestamp: Int64? = nil) {
            self.message = message
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case timestamp = "timestamp"
        }
    }

    public struct LogGroup: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the log group. This version of the ARN includes a trailing :* after the log group name.  Use this version to refer to the ARN in IAM policies when specifying permissions for most API actions. The exception is when specifying permissions for TagResource, UntagResource, and ListTagsForResource. The permissions for those three actions require the ARN version that doesn't include a trailing :*.
        public let arn: String?
        /// The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let creationTime: Int64?
        /// Displays whether this log group has a protection policy, or whether it had one in the past. For more information, see PutDataProtectionPolicy.
        public let dataProtectionStatus: DataProtectionStatus?
        /// Displays all the properties that this log group has inherited from account-level settings.
        public let inheritedProperties: [InheritedProperty]?
        /// The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data.
        public let kmsKeyId: String?
        /// The Amazon Resource Name (ARN) of the log group. This version of the ARN doesn't include a trailing :* after the log group name.  Use this version to refer to the ARN in the following situations:   In the logGroupIdentifier input field in many CloudWatch Logs APIs.   In the resourceArn field in tagging APIs   In IAM policies, when specifying permissions for TagResource, UntagResource, and ListTagsForResource.
        public let logGroupArn: String?
        /// This specifies the log group class for this log group. There are three classes:   The Standard log class supports all CloudWatch Logs features.   The Infrequent Access log class supports a subset of CloudWatch Logs features and incurs lower costs.   Use the Delivery log class only for delivering Lambda logs to store in Amazon S3 or Amazon Data Firehose. Log events in log groups in the Delivery class are kept in CloudWatch Logs for only one day. This log class doesn't offer rich CloudWatch Logs capabilities such as CloudWatch Logs Insights queries.   For details about the features supported by the Standard and Infrequent Access classes, see Log classes
        public let logGroupClass: LogGroupClass?
        /// The name of the log group.
        public let logGroupName: String?
        /// The number of metric filters.
        public let metricFilterCount: Int?
        public let retentionInDays: Int?
        /// The number of bytes stored.
        public let storedBytes: Int64?

        @inlinable
        public init(arn: String? = nil, creationTime: Int64? = nil, dataProtectionStatus: DataProtectionStatus? = nil, inheritedProperties: [InheritedProperty]? = nil, kmsKeyId: String? = nil, logGroupArn: String? = nil, logGroupClass: LogGroupClass? = nil, logGroupName: String? = nil, metricFilterCount: Int? = nil, retentionInDays: Int? = nil, storedBytes: Int64? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.dataProtectionStatus = dataProtectionStatus
            self.inheritedProperties = inheritedProperties
            self.kmsKeyId = kmsKeyId
            self.logGroupArn = logGroupArn
            self.logGroupClass = logGroupClass
            self.logGroupName = logGroupName
            self.metricFilterCount = metricFilterCount
            self.retentionInDays = retentionInDays
            self.storedBytes = storedBytes
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case creationTime = "creationTime"
            case dataProtectionStatus = "dataProtectionStatus"
            case inheritedProperties = "inheritedProperties"
            case kmsKeyId = "kmsKeyId"
            case logGroupArn = "logGroupArn"
            case logGroupClass = "logGroupClass"
            case logGroupName = "logGroupName"
            case metricFilterCount = "metricFilterCount"
            case retentionInDays = "retentionInDays"
            case storedBytes = "storedBytes"
        }
    }

    public struct LogGroupField: AWSDecodableShape {
        /// The name of a log field.
        public let name: String?
        /// The percentage of log events queried that contained the field.
        public let percent: Int?

        @inlinable
        public init(name: String? = nil, percent: Int? = nil) {
            self.name = name
            self.percent = percent
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case percent = "percent"
        }
    }

    public struct LogGroupSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the log group.
        public let logGroupArn: String?
        /// The log group class for this log group. For details about the features supported by each log group class, see Log classes
        public let logGroupClass: LogGroupClass?
        /// The name of the log group.
        public let logGroupName: String?

        @inlinable
        public init(logGroupArn: String? = nil, logGroupClass: LogGroupClass? = nil, logGroupName: String? = nil) {
            self.logGroupArn = logGroupArn
            self.logGroupClass = logGroupClass
            self.logGroupName = logGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupArn = "logGroupArn"
            case logGroupClass = "logGroupClass"
            case logGroupName = "logGroupName"
        }
    }

    public struct LogStream: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the log stream.
        public let arn: String?
        /// The creation time of the stream, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let creationTime: Int64?
        /// The time of the first event, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let firstEventTimestamp: Int64?
        /// The time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. The lastEventTime value updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.
        public let lastEventTimestamp: Int64?
        /// The ingestion time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC The lastIngestionTime value updates on an eventual consistency basis. It typically updates in less than an hour after ingestion, but in rare situations might take longer.
        public let lastIngestionTime: Int64?
        /// The name of the log stream.
        public let logStreamName: String?
        /// The number of bytes stored.  Important: As of June 17, 2019, this parameter is no longer supported for log streams, and is always reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected.
        public let storedBytes: Int64?
        /// The sequence token.  The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted regardless of receiving an invalid sequence token. You don't need to obtain uploadSequenceToken to use a PutLogEvents action.
        public let uploadSequenceToken: String?

        @inlinable
        public init(arn: String? = nil, creationTime: Int64? = nil, firstEventTimestamp: Int64? = nil, lastEventTimestamp: Int64? = nil, lastIngestionTime: Int64? = nil, logStreamName: String? = nil, uploadSequenceToken: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.firstEventTimestamp = firstEventTimestamp
            self.lastEventTimestamp = lastEventTimestamp
            self.lastIngestionTime = lastIngestionTime
            self.logStreamName = logStreamName
            self.storedBytes = nil
            self.uploadSequenceToken = uploadSequenceToken
        }

        @available(*, deprecated, message: "Members storedBytes have been deprecated")
        @inlinable
        public init(arn: String? = nil, creationTime: Int64? = nil, firstEventTimestamp: Int64? = nil, lastEventTimestamp: Int64? = nil, lastIngestionTime: Int64? = nil, logStreamName: String? = nil, storedBytes: Int64? = nil, uploadSequenceToken: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.firstEventTimestamp = firstEventTimestamp
            self.lastEventTimestamp = lastEventTimestamp
            self.lastIngestionTime = lastIngestionTime
            self.logStreamName = logStreamName
            self.storedBytes = storedBytes
            self.uploadSequenceToken = uploadSequenceToken
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case creationTime = "creationTime"
            case firstEventTimestamp = "firstEventTimestamp"
            case lastEventTimestamp = "lastEventTimestamp"
            case lastIngestionTime = "lastIngestionTime"
            case logStreamName = "logStreamName"
            case storedBytes = "storedBytes"
            case uploadSequenceToken = "uploadSequenceToken"
        }
    }

    public struct LowerCaseString: AWSEncodableShape & AWSDecodableShape {
        /// The array caontaining the keys of the fields to convert to lowercase.
        public let withKeys: [String]

        @inlinable
        public init(withKeys: [String]) {
            self.withKeys = withKeys
        }

        public func validate(name: String) throws {
            try self.withKeys.forEach {
                try validate($0, name: "withKeys[]", parent: name, min: 1)
            }
            try self.validate(self.withKeys, name: "withKeys", parent: name, max: 10)
            try self.validate(self.withKeys, name: "withKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case withKeys = "withKeys"
        }
    }

    public struct MalformedQueryException: AWSErrorShape {
        public let message: String?
        public let queryCompileError: QueryCompileError?

        @inlinable
        public init(message: String? = nil, queryCompileError: QueryCompileError? = nil) {
            self.message = message
            self.queryCompileError = queryCompileError
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case queryCompileError = "queryCompileError"
        }
    }

    public struct MetricFilter: AWSDecodableShape {
        /// This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.
        public let applyOnTransformedLogs: Bool?
        /// The creation time of the metric filter, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let creationTime: Int64?
        /// The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the emitSystemFieldDimensions value if it was specified when the metric filter was created.
        public let emitSystemFieldDimensions: [String]?
        /// The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the metric filter was created.
        public let fieldSelectionCriteria: String?
        /// The name of the metric filter.
        public let filterName: String?
        public let filterPattern: String?
        /// The name of the log group.
        public let logGroupName: String?
        /// The metric transformations.
        public let metricTransformations: [MetricTransformation]?

        @inlinable
        public init(applyOnTransformedLogs: Bool? = nil, creationTime: Int64? = nil, emitSystemFieldDimensions: [String]? = nil, fieldSelectionCriteria: String? = nil, filterName: String? = nil, filterPattern: String? = nil, logGroupName: String? = nil, metricTransformations: [MetricTransformation]? = nil) {
            self.applyOnTransformedLogs = applyOnTransformedLogs
            self.creationTime = creationTime
            self.emitSystemFieldDimensions = emitSystemFieldDimensions
            self.fieldSelectionCriteria = fieldSelectionCriteria
            self.filterName = filterName
            self.filterPattern = filterPattern
            self.logGroupName = logGroupName
            self.metricTransformations = metricTransformations
        }

        private enum CodingKeys: String, CodingKey {
            case applyOnTransformedLogs = "applyOnTransformedLogs"
            case creationTime = "creationTime"
            case emitSystemFieldDimensions = "emitSystemFieldDimensions"
            case fieldSelectionCriteria = "fieldSelectionCriteria"
            case filterName = "filterName"
            case filterPattern = "filterPattern"
            case logGroupName = "logGroupName"
            case metricTransformations = "metricTransformations"
        }
    }

    public struct MetricFilterMatchRecord: AWSDecodableShape {
        /// The raw event data.
        public let eventMessage: String?
        /// The event number.
        public let eventNumber: Int64?
        /// The values extracted from the event data by the filter.
        public let extractedValues: [String: String]?

        @inlinable
        public init(eventMessage: String? = nil, eventNumber: Int64? = nil, extractedValues: [String: String]? = nil) {
            self.eventMessage = eventMessage
            self.eventNumber = eventNumber
            self.extractedValues = extractedValues
        }

        private enum CodingKeys: String, CodingKey {
            case eventMessage = "eventMessage"
            case eventNumber = "eventNumber"
            case extractedValues = "extractedValues"
        }
    }

    public struct MetricTransformation: AWSEncodableShape & AWSDecodableShape {
        /// (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
        public let defaultValue: Double?
        /// The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.  Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.  CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see  Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
        public let dimensions: [String: String]?
        /// The name of the CloudWatch metric.
        public let metricName: String
        /// A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
        public let metricNamespace: String
        /// The value to publish to the CloudWatch metric when a filter pattern matches a log event.
        public let metricValue: String
        /// The unit to assign to the metric. If you omit this, the unit is set as None.
        public let unit: StandardUnit?

        @inlinable
        public init(defaultValue: Double? = nil, dimensions: [String: String]? = nil, metricName: String, metricNamespace: String, metricValue: String, unit: StandardUnit? = nil) {
            self.defaultValue = defaultValue
            self.dimensions = dimensions
            self.metricName = metricName
            self.metricNamespace = metricNamespace
            self.metricValue = metricValue
            self.unit = unit
        }

        public func validate(name: String) throws {
            try self.dimensions?.forEach {
                try validate($0.key, name: "dimensions.key", parent: name, max: 255)
                try validate($0.value, name: "dimensions[\"\($0.key)\"]", parent: name, max: 255)
            }
            try self.validate(self.metricName, name: "metricName", parent: name, max: 255)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[^:*$]*$")
            try self.validate(self.metricNamespace, name: "metricNamespace", parent: name, max: 255)
            try self.validate(self.metricNamespace, name: "metricNamespace", parent: name, pattern: "^[^:*$]*$")
            try self.validate(self.metricValue, name: "metricValue", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValue = "defaultValue"
            case dimensions = "dimensions"
            case metricName = "metricName"
            case metricNamespace = "metricNamespace"
            case metricValue = "metricValue"
            case unit = "unit"
        }
    }

    public struct MoveKeyEntry: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is false.
        public let overwriteIfExists: Bool?
        /// The key to move.
        public let source: String
        /// The key to move to.
        public let target: String

        @inlinable
        public init(overwriteIfExists: Bool? = nil, source: String, target: String) {
            self.overwriteIfExists = overwriteIfExists
            self.source = source
            self.target = target
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
            try self.validate(self.target, name: "target", parent: name, max: 128)
            try self.validate(self.target, name: "target", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case overwriteIfExists = "overwriteIfExists"
            case source = "source"
            case target = "target"
        }
    }

    public struct MoveKeys: AWSEncodableShape & AWSDecodableShape {
        /// An array of objects, where each object contains the information about one key to move.
        public let entries: [MoveKeyEntry]

        @inlinable
        public init(entries: [MoveKeyEntry]) {
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 5)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "entries"
        }
    }

    public struct OpenSearchApplication: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application.
        public let applicationArn: String?
        /// The endpoint of the application.
        public let applicationEndpoint: String?
        /// The ID of the application.
        public let applicationId: String?
        /// This structure contains information about the status of this OpenSearch Service resource.
        public let status: OpenSearchResourceStatus?

        @inlinable
        public init(applicationArn: String? = nil, applicationEndpoint: String? = nil, applicationId: String? = nil, status: OpenSearchResourceStatus? = nil) {
            self.applicationArn = applicationArn
            self.applicationEndpoint = applicationEndpoint
            self.applicationId = applicationId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn = "applicationArn"
            case applicationEndpoint = "applicationEndpoint"
            case applicationId = "applicationId"
            case status = "status"
        }
    }

    public struct OpenSearchCollection: AWSDecodableShape {
        /// The ARN of the collection.
        public let collectionArn: String?
        /// The endpoint of the collection.
        public let collectionEndpoint: String?
        /// This structure contains information about the status of this OpenSearch Service resource.
        public let status: OpenSearchResourceStatus?

        @inlinable
        public init(collectionArn: String? = nil, collectionEndpoint: String? = nil, status: OpenSearchResourceStatus? = nil) {
            self.collectionArn = collectionArn
            self.collectionEndpoint = collectionEndpoint
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case collectionArn = "collectionArn"
            case collectionEndpoint = "collectionEndpoint"
            case status = "status"
        }
    }

    public struct OpenSearchDataAccessPolicy: AWSDecodableShape {
        /// The name of the data access policy.
        public let policyName: String?
        /// This structure contains information about the status of this OpenSearch Service resource.
        public let status: OpenSearchResourceStatus?

        @inlinable
        public init(policyName: String? = nil, status: OpenSearchResourceStatus? = nil) {
            self.policyName = policyName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case policyName = "policyName"
            case status = "status"
        }
    }

    public struct OpenSearchDataSource: AWSDecodableShape {
        /// The name of the OpenSearch Service data source.
        public let dataSourceName: String?
        /// This structure contains information about the status of this OpenSearch Service resource.
        public let status: OpenSearchResourceStatus?

        @inlinable
        public init(dataSourceName: String? = nil, status: OpenSearchResourceStatus? = nil) {
            self.dataSourceName = dataSourceName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceName = "dataSourceName"
            case status = "status"
        }
    }

    public struct OpenSearchEncryptionPolicy: AWSDecodableShape {
        /// The name of the encryption policy.
        public let policyName: String?
        /// This structure contains information about the status of this OpenSearch Service resource.
        public let status: OpenSearchResourceStatus?

        @inlinable
        public init(policyName: String? = nil, status: OpenSearchResourceStatus? = nil) {
            self.policyName = policyName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case policyName = "policyName"
            case status = "status"
        }
    }

    public struct OpenSearchIntegrationDetails: AWSDecodableShape {
        /// This structure contains information about the OpenSearch Service data access policy used for this integration. The access policy defines the access controls for the collection. This data access policy was automatically created as part of the integration setup. For more information about OpenSearch Service data access policies, see Data access control for Amazon OpenSearch Serverless in the OpenSearch Service Developer Guide.
        public let accessPolicy: OpenSearchDataAccessPolicy?
        /// This structure contains information about the OpenSearch Service application used for this integration. An OpenSearch Service application is the web application that was created by the integration with CloudWatch Logs. It hosts the vended logs dashboards.
        public let application: OpenSearchApplication?
        /// This structure contains information about the OpenSearch Service collection used for this integration. This collection was created as part of the integration setup. An OpenSearch Service collection is a logical grouping of one or more indexes that represent an analytics workload. For more information, see Creating and managing OpenSearch Service Serverless collections.
        public let collection: OpenSearchCollection?
        /// This structure contains information about the OpenSearch Service data source used for this integration. This data source was created as part of the integration setup. An OpenSearch Service data source defines the source and destination for OpenSearch Service queries. It includes the role required to execute queries and write to collections. For more information about OpenSearch Service data sources , see Creating OpenSearch Service data source integrations with Amazon S3.
        public let dataSource: OpenSearchDataSource?
        /// This structure contains information about the OpenSearch Service encryption policy used for this integration. The encryption policy was created automatically when you created the integration. For more information, see Encryption policies in the OpenSearch Service Developer Guide.
        public let encryptionPolicy: OpenSearchEncryptionPolicy?
        /// This structure contains information about the OpenSearch Service data lifecycle policy used for this integration. The lifecycle policy determines the lifespan of the data in the collection. It was automatically created as part of the integration setup. For more information, see Using data lifecycle policies with OpenSearch Service Serverless in the OpenSearch Service Developer Guide.
        public let lifecyclePolicy: OpenSearchLifecyclePolicy?
        /// This structure contains information about the OpenSearch Service network policy used for this integration. The network policy assigns network access settings to collections. For more information, see Network policies in the OpenSearch Service Developer Guide.
        public let networkPolicy: OpenSearchNetworkPolicy?
        /// This structure contains information about the OpenSearch Service workspace used for this integration. An OpenSearch Service workspace is the collection of dashboards along with other OpenSearch Service tools. This workspace was created automatically as part of the integration setup. For more information, see Centralized OpenSearch user interface (Dashboards) with OpenSearch Service.
        public let workspace: OpenSearchWorkspace?

        @inlinable
        public init(accessPolicy: OpenSearchDataAccessPolicy? = nil, application: OpenSearchApplication? = nil, collection: OpenSearchCollection? = nil, dataSource: OpenSearchDataSource? = nil, encryptionPolicy: OpenSearchEncryptionPolicy? = nil, lifecyclePolicy: OpenSearchLifecyclePolicy? = nil, networkPolicy: OpenSearchNetworkPolicy? = nil, workspace: OpenSearchWorkspace? = nil) {
            self.accessPolicy = accessPolicy
            self.application = application
            self.collection = collection
            self.dataSource = dataSource
            self.encryptionPolicy = encryptionPolicy
            self.lifecyclePolicy = lifecyclePolicy
            self.networkPolicy = networkPolicy
            self.workspace = workspace
        }

        private enum CodingKeys: String, CodingKey {
            case accessPolicy = "accessPolicy"
            case application = "application"
            case collection = "collection"
            case dataSource = "dataSource"
            case encryptionPolicy = "encryptionPolicy"
            case lifecyclePolicy = "lifecyclePolicy"
            case networkPolicy = "networkPolicy"
            case workspace = "workspace"
        }
    }

    public struct OpenSearchLifecyclePolicy: AWSDecodableShape {
        /// The name of the lifecycle policy.
        public let policyName: String?
        /// This structure contains information about the status of this OpenSearch Service resource.
        public let status: OpenSearchResourceStatus?

        @inlinable
        public init(policyName: String? = nil, status: OpenSearchResourceStatus? = nil) {
            self.policyName = policyName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case policyName = "policyName"
            case status = "status"
        }
    }

    public struct OpenSearchNetworkPolicy: AWSDecodableShape {
        /// The name of the network policy.
        public let policyName: String?
        /// This structure contains information about the status of this OpenSearch Service resource.
        public let status: OpenSearchResourceStatus?

        @inlinable
        public init(policyName: String? = nil, status: OpenSearchResourceStatus? = nil) {
            self.policyName = policyName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case policyName = "policyName"
            case status = "status"
        }
    }

    public struct OpenSearchResourceConfig: AWSEncodableShape {
        /// If you want to use an existing OpenSearch Service application for your integration with OpenSearch Service, specify it here. If you omit this, a new application will be created.
        public let applicationArn: String?
        /// Specify the ARNs of IAM roles and IAM users who you want to grant permission to for viewing the dashboards.  In addition to specifying these users here, you must also grant them the CloudWatchOpenSearchDashboardAccess IAM policy. For more information, see IAM policies for users.
        public let dashboardViewerPrincipals: [String]
        /// Specify the ARN of an IAM role that CloudWatch Logs will use to create the integration. This role must have the permissions necessary to access the OpenSearch Service collection to be able to create the dashboards. For more information about the permissions needed, see Permissions that the integration needs in the CloudWatch Logs User Guide.
        public let dataSourceRoleArn: String
        /// To have the vended dashboard data encrypted with KMS instead of the CloudWatch Logs default encryption method, specify the ARN of the KMS key that you want to use.
        public let kmsKeyArn: String?
        /// Specify how many days that you want the data derived by OpenSearch Service to be retained in the index that the dashboard refers to. This also sets the maximum time period that you can choose when viewing data in the dashboard. Choosing a longer time frame will incur additional costs.
        public let retentionDays: Int

        @inlinable
        public init(applicationArn: String? = nil, dashboardViewerPrincipals: [String], dataSourceRoleArn: String, kmsKeyArn: String? = nil, retentionDays: Int) {
            self.applicationArn = applicationArn
            self.dashboardViewerPrincipals = dashboardViewerPrincipals
            self.dataSourceRoleArn = dataSourceRoleArn
            self.kmsKeyArn = kmsKeyArn
            self.retentionDays = retentionDays
        }

        public func validate(name: String) throws {
            try self.validate(self.retentionDays, name: "retentionDays", parent: name, max: 30)
            try self.validate(self.retentionDays, name: "retentionDays", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn = "applicationArn"
            case dashboardViewerPrincipals = "dashboardViewerPrincipals"
            case dataSourceRoleArn = "dataSourceRoleArn"
            case kmsKeyArn = "kmsKeyArn"
            case retentionDays = "retentionDays"
        }
    }

    public struct OpenSearchResourceStatus: AWSDecodableShape {
        /// The current status of this resource.
        public let status: OpenSearchResourceStatusType?
        /// A message with additional information about the status of this resource.
        public let statusMessage: String?

        @inlinable
        public init(status: OpenSearchResourceStatusType? = nil, statusMessage: String? = nil) {
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
            case statusMessage = "statusMessage"
        }
    }

    public struct OpenSearchWorkspace: AWSDecodableShape {
        /// This structure contains information about the status of an OpenSearch Service resource.
        public let status: OpenSearchResourceStatus?
        /// The ID of this workspace.
        public let workspaceId: String?

        @inlinable
        public init(status: OpenSearchResourceStatus? = nil, workspaceId: String? = nil) {
            self.status = status
            self.workspaceId = workspaceId
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
            case workspaceId = "workspaceId"
        }
    }

    public struct OutputLogEvent: AWSDecodableShape {
        /// The time the event was ingested, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let ingestionTime: Int64?
        /// The data contained in the log event.
        public let message: String?
        /// The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let timestamp: Int64?

        @inlinable
        public init(ingestionTime: Int64? = nil, message: String? = nil, timestamp: Int64? = nil) {
            self.ingestionTime = ingestionTime
            self.message = message
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case ingestionTime = "ingestionTime"
            case message = "message"
            case timestamp = "timestamp"
        }
    }

    public struct ParseCloudfront: AWSEncodableShape & AWSDecodableShape {
        /// Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source.
        public let source: String?

        @inlinable
        public init(source: String? = nil) {
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case source = "source"
        }
    }

    public struct ParseJSON: AWSEncodableShape & AWSDecodableShape {
        /// The location to put the parsed key value pair into. If you omit this parameter, it is placed under the root node.
        public let destination: String?
        /// Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example, store.book
        public let source: String?

        @inlinable
        public init(destination: String? = nil, source: String? = nil) {
            self.destination = destination
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.destination, name: "destination", parent: name, max: 128)
            try self.validate(self.destination, name: "destination", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case destination = "destination"
            case source = "source"
        }
    }

    public struct ParseKeyValue: AWSEncodableShape & AWSDecodableShape {
        /// The destination field to put the extracted key-value pairs into
        public let destination: String?
        /// The field delimiter string that is used between key-value pairs in the original log events. If you omit this, the ampersand & character is used.
        public let fieldDelimiter: String?
        /// If you want to add a prefix to all transformed keys, specify it here.
        public let keyPrefix: String?
        /// The delimiter string to use between the key and value in each pair in the transformed log event. If you omit this, the equal = character is used.
        public let keyValueDelimiter: String?
        /// A value to insert into the value field in the result, when a key-value pair is not successfully split.
        public let nonMatchValue: String?
        /// Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is false.
        public let overwriteIfExists: Bool?
        /// Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example, store.book
        public let source: String?

        @inlinable
        public init(destination: String? = nil, fieldDelimiter: String? = nil, keyPrefix: String? = nil, keyValueDelimiter: String? = nil, nonMatchValue: String? = nil, overwriteIfExists: Bool? = nil, source: String? = nil) {
            self.destination = destination
            self.fieldDelimiter = fieldDelimiter
            self.keyPrefix = keyPrefix
            self.keyValueDelimiter = keyValueDelimiter
            self.nonMatchValue = nonMatchValue
            self.overwriteIfExists = overwriteIfExists
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.destination, name: "destination", parent: name, max: 128)
            try self.validate(self.destination, name: "destination", parent: name, min: 1)
            try self.validate(self.fieldDelimiter, name: "fieldDelimiter", parent: name, max: 128)
            try self.validate(self.fieldDelimiter, name: "fieldDelimiter", parent: name, min: 1)
            try self.validate(self.keyPrefix, name: "keyPrefix", parent: name, max: 128)
            try self.validate(self.keyPrefix, name: "keyPrefix", parent: name, min: 1)
            try self.validate(self.keyValueDelimiter, name: "keyValueDelimiter", parent: name, max: 128)
            try self.validate(self.keyValueDelimiter, name: "keyValueDelimiter", parent: name, min: 1)
            try self.validate(self.nonMatchValue, name: "nonMatchValue", parent: name, max: 128)
            try self.validate(self.nonMatchValue, name: "nonMatchValue", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case destination = "destination"
            case fieldDelimiter = "fieldDelimiter"
            case keyPrefix = "keyPrefix"
            case keyValueDelimiter = "keyValueDelimiter"
            case nonMatchValue = "nonMatchValue"
            case overwriteIfExists = "overwriteIfExists"
            case source = "source"
        }
    }

    public struct ParsePostgres: AWSEncodableShape & AWSDecodableShape {
        /// Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source.
        public let source: String?

        @inlinable
        public init(source: String? = nil) {
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case source = "source"
        }
    }

    public struct ParseRoute53: AWSEncodableShape & AWSDecodableShape {
        /// Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source.
        public let source: String?

        @inlinable
        public init(source: String? = nil) {
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case source = "source"
        }
    }

    public struct ParseToOCSF: AWSEncodableShape & AWSDecodableShape {
        /// Specify the service or process that produces the log events that will be converted with this processor.
        public let eventSource: EventSource
        /// Specify which version of the OCSF schema to use for the transformed log events.
        public let ocsfVersion: OCSFVersion
        /// The path to the field in the log event that you want to parse. If you omit this value, the whole log message is parsed.
        public let source: String?

        @inlinable
        public init(eventSource: EventSource, ocsfVersion: OCSFVersion, source: String? = nil) {
            self.eventSource = eventSource
            self.ocsfVersion = ocsfVersion
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case eventSource = "eventSource"
            case ocsfVersion = "ocsfVersion"
            case source = "source"
        }
    }

    public struct ParseVPC: AWSEncodableShape & AWSDecodableShape {
        /// Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source.
        public let source: String?

        @inlinable
        public init(source: String? = nil) {
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case source = "source"
        }
    }

    public struct ParseWAF: AWSEncodableShape & AWSDecodableShape {
        /// Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source.
        public let source: String?

        @inlinable
        public init(source: String? = nil) {
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case source = "source"
        }
    }

    public struct PatternToken: AWSDecodableShape {
        /// For a dynamic token, this indicates where in the pattern that this token appears, related to other dynamic tokens. The dynamic token that appears first has a value of 1, the one that appears second is 2, and so on.
        public let dynamicTokenPosition: Int?
        /// Contains the values found for a dynamic token, and the number of times each value was found.
        public let enumerations: [String: Int64]?
        /// A name that CloudWatch Logs assigned to this dynamic token to make the pattern more readable. The string part of the inferredTokenName gives you a clearer idea of the content of this token. The number part of the inferredTokenName shows where in the pattern this token appears, compared to other dynamic tokens. CloudWatch Logs assigns the string part of the name based on analyzing the content of the log events that contain it. For example, an inferred token name of IPAddress-3 means that the token represents an IP address, and this token is the third dynamic token in the pattern.
        public let inferredTokenName: String?
        /// Specifies whether this is a dynamic token.
        public let isDynamic: Bool?
        /// The string represented by this token. If this is a dynamic token, the value will be
        public let tokenString: String?

        @inlinable
        public init(dynamicTokenPosition: Int? = nil, enumerations: [String: Int64]? = nil, inferredTokenName: String? = nil, isDynamic: Bool? = nil, tokenString: String? = nil) {
            self.dynamicTokenPosition = dynamicTokenPosition
            self.enumerations = enumerations
            self.inferredTokenName = inferredTokenName
            self.isDynamic = isDynamic
            self.tokenString = tokenString
        }

        private enum CodingKeys: String, CodingKey {
            case dynamicTokenPosition = "dynamicTokenPosition"
            case enumerations = "enumerations"
            case inferredTokenName = "inferredTokenName"
            case isDynamic = "isDynamic"
            case tokenString = "tokenString"
        }
    }

    public struct Policy: AWSDecodableShape {
        /// The contents of the delivery destination policy.
        public let deliveryDestinationPolicy: String?

        @inlinable
        public init(deliveryDestinationPolicy: String? = nil) {
            self.deliveryDestinationPolicy = deliveryDestinationPolicy
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestinationPolicy = "deliveryDestinationPolicy"
        }
    }

    public struct Processor: AWSEncodableShape & AWSDecodableShape {
        /// Use this parameter to include the  addKeys processor in your transformer.
        public let addKeys: AddKeys?
        /// Use this parameter to include the  copyValue processor in your transformer.
        public let copyValue: CopyValue?
        /// Use this parameter to include the  CSV processor in your transformer.
        public let csv: CSV?
        /// Use this parameter to include the  datetimeConverter processor in your transformer.
        public let dateTimeConverter: DateTimeConverter?
        /// Use this parameter to include the  deleteKeys processor in your transformer.
        public let deleteKeys: DeleteKeys?
        /// Use this parameter to include the  grok processor in your transformer.
        public let grok: Grok?
        /// Use this parameter to include the  listToMap processor in your transformer.
        public let listToMap: ListToMap?
        /// Use this parameter to include the  lowerCaseString processor in your transformer.
        public let lowerCaseString: LowerCaseString?
        /// Use this parameter to include the  moveKeys processor in your transformer.
        public let moveKeys: MoveKeys?
        /// Use this parameter to include the  parseCloudfront processor in your transformer. If you use this processor, it must be the first processor in your transformer.
        public let parseCloudfront: ParseCloudfront?
        /// Use this parameter to include the  parseJSON processor in your transformer.
        public let parseJSON: ParseJSON?
        /// Use this parameter to include the  parseKeyValue processor in your transformer.
        public let parseKeyValue: ParseKeyValue?
        /// Use this parameter to include the  parsePostGres processor in your transformer. If you use this processor, it must be the first processor in your transformer.
        public let parsePostgres: ParsePostgres?
        /// Use this parameter to include the  parseRoute53 processor in your transformer. If you use this processor, it must be the first processor in your transformer.
        public let parseRoute53: ParseRoute53?
        /// Use this parameter to convert logs into Open Cybersecurity Schema (OCSF) format.
        public let parseToOCSF: ParseToOCSF?
        /// Use this parameter to include the  parseVPC processor in your transformer. If you use this processor, it must be the first processor in your transformer.
        public let parseVPC: ParseVPC?
        /// Use this parameter to include the  parseWAF processor in your transformer. If you use this processor, it must be the first processor in your transformer.
        public let parseWAF: ParseWAF?
        /// Use this parameter to include the  renameKeys processor in your transformer.
        public let renameKeys: RenameKeys?
        /// Use this parameter to include the  splitString processor in your transformer.
        public let splitString: SplitString?
        /// Use this parameter to include the  substituteString processor in your transformer.
        public let substituteString: SubstituteString?
        /// Use this parameter to include the  trimString processor in your transformer.
        public let trimString: TrimString?
        /// Use this parameter to include the  typeConverter processor in your transformer.
        public let typeConverter: TypeConverter?
        /// Use this parameter to include the  upperCaseString processor in your transformer.
        public let upperCaseString: UpperCaseString?

        @inlinable
        public init(addKeys: AddKeys? = nil, copyValue: CopyValue? = nil, csv: CSV? = nil, dateTimeConverter: DateTimeConverter? = nil, deleteKeys: DeleteKeys? = nil, grok: Grok? = nil, listToMap: ListToMap? = nil, lowerCaseString: LowerCaseString? = nil, moveKeys: MoveKeys? = nil, parseCloudfront: ParseCloudfront? = nil, parseJSON: ParseJSON? = nil, parseKeyValue: ParseKeyValue? = nil, parsePostgres: ParsePostgres? = nil, parseRoute53: ParseRoute53? = nil, parseToOCSF: ParseToOCSF? = nil, parseVPC: ParseVPC? = nil, parseWAF: ParseWAF? = nil, renameKeys: RenameKeys? = nil, splitString: SplitString? = nil, substituteString: SubstituteString? = nil, trimString: TrimString? = nil, typeConverter: TypeConverter? = nil, upperCaseString: UpperCaseString? = nil) {
            self.addKeys = addKeys
            self.copyValue = copyValue
            self.csv = csv
            self.dateTimeConverter = dateTimeConverter
            self.deleteKeys = deleteKeys
            self.grok = grok
            self.listToMap = listToMap
            self.lowerCaseString = lowerCaseString
            self.moveKeys = moveKeys
            self.parseCloudfront = parseCloudfront
            self.parseJSON = parseJSON
            self.parseKeyValue = parseKeyValue
            self.parsePostgres = parsePostgres
            self.parseRoute53 = parseRoute53
            self.parseToOCSF = parseToOCSF
            self.parseVPC = parseVPC
            self.parseWAF = parseWAF
            self.renameKeys = renameKeys
            self.splitString = splitString
            self.substituteString = substituteString
            self.trimString = trimString
            self.typeConverter = typeConverter
            self.upperCaseString = upperCaseString
        }

        public func validate(name: String) throws {
            try self.addKeys?.validate(name: "\(name).addKeys")
            try self.copyValue?.validate(name: "\(name).copyValue")
            try self.csv?.validate(name: "\(name).csv")
            try self.dateTimeConverter?.validate(name: "\(name).dateTimeConverter")
            try self.deleteKeys?.validate(name: "\(name).deleteKeys")
            try self.grok?.validate(name: "\(name).grok")
            try self.listToMap?.validate(name: "\(name).listToMap")
            try self.lowerCaseString?.validate(name: "\(name).lowerCaseString")
            try self.moveKeys?.validate(name: "\(name).moveKeys")
            try self.parseCloudfront?.validate(name: "\(name).parseCloudfront")
            try self.parseJSON?.validate(name: "\(name).parseJSON")
            try self.parseKeyValue?.validate(name: "\(name).parseKeyValue")
            try self.parsePostgres?.validate(name: "\(name).parsePostgres")
            try self.parseRoute53?.validate(name: "\(name).parseRoute53")
            try self.parseToOCSF?.validate(name: "\(name).parseToOCSF")
            try self.parseVPC?.validate(name: "\(name).parseVPC")
            try self.parseWAF?.validate(name: "\(name).parseWAF")
            try self.renameKeys?.validate(name: "\(name).renameKeys")
            try self.splitString?.validate(name: "\(name).splitString")
            try self.substituteString?.validate(name: "\(name).substituteString")
            try self.trimString?.validate(name: "\(name).trimString")
            try self.typeConverter?.validate(name: "\(name).typeConverter")
            try self.upperCaseString?.validate(name: "\(name).upperCaseString")
        }

        private enum CodingKeys: String, CodingKey {
            case addKeys = "addKeys"
            case copyValue = "copyValue"
            case csv = "csv"
            case dateTimeConverter = "dateTimeConverter"
            case deleteKeys = "deleteKeys"
            case grok = "grok"
            case listToMap = "listToMap"
            case lowerCaseString = "lowerCaseString"
            case moveKeys = "moveKeys"
            case parseCloudfront = "parseCloudfront"
            case parseJSON = "parseJSON"
            case parseKeyValue = "parseKeyValue"
            case parsePostgres = "parsePostgres"
            case parseRoute53 = "parseRoute53"
            case parseToOCSF = "parseToOCSF"
            case parseVPC = "parseVPC"
            case parseWAF = "parseWAF"
            case renameKeys = "renameKeys"
            case splitString = "splitString"
            case substituteString = "substituteString"
            case trimString = "trimString"
            case typeConverter = "typeConverter"
            case upperCaseString = "upperCaseString"
        }
    }

    public struct PutAccountPolicyRequest: AWSEncodableShape {
        /// Specify the policy, in JSON.  Data protection policy  A data protection policy must include two JSON blocks:   The first block must include both a DataIdentifer array and an Operation property with an Audit action. The DataIdentifer array lists the types of sensitive data that you want to mask. For more information about the available options, see Types of data that you can mask. The Operation property with an Audit action is required to find the sensitive data terms. This Audit action must contain a FindingsDestination object. You can optionally use that FindingsDestination object to list one or more destinations to send audit findings to. If you specify destinations such as log groups, Firehose streams, and S3 buckets, they must already exist.   The second block must include both a DataIdentifer array and an Operation property with an Deidentify action. The DataIdentifer array must exactly match the DataIdentifer array in the first block of the policy. The Operation property with the Deidentify action is what actually masks the data, and it must contain the  "MaskConfig": {} object. The  "MaskConfig": {} object must be empty.   For an example data protection policy, see the Examples section on this page.  The contents of the two DataIdentifer arrays must match exactly.  In addition to the two JSON blocks, the policyDocument can also include Name, Description, and Version fields. The Name is different than the operation's policyName parameter, and is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch. The JSON specified in policyDocument can be up to 30,720 characters long.  Subscription filter policy  A subscription filter policy can include the following attributes in a JSON block:    DestinationArn The ARN of the destination to deliver log events to. Supported destinations are:   An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.   An Firehose data stream in the same account as the subscription policy, for same-account delivery.   A Lambda function in the same account as the subscription policy, for same-account delivery.   A logical destination in a different account created with PutDestination, for cross-account delivery. Kinesis Data Streams and Firehose are supported as logical destinations.      RoleArn The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.    FilterPattern A filter pattern for subscribing to a filtered stream of log events.    Distribution The method used to distribute log data to the destination. By default, log data is grouped by log stream, but the grouping can be set to Random for a more even distribution. This property is only applicable when the destination is an Kinesis Data Streams data stream.    Transformer policy  A transformer policy must include one JSON block with the array of processors and their configurations. For more information about available processors, see  Processors that you can use.   Field index policy  A field index filter policy can include the following attribute in a JSON block:    Fields The array of field indexes to create.   It must contain at least one field index. The following is an example of an index policy document that creates two indexes, RequestId and TransactionId.  "policyDocument": "{ \"Fields\": [ \"RequestId\", \"TransactionId\" ] }"
        public let policyDocument: String
        /// A name for the policy. This must be unique within the account.
        public let policyName: String
        /// The type of policy that you're creating or updating.
        public let policyType: PolicyType
        /// Currently the only valid value for this parameter is ALL, which specifies that the data protection policy applies to all log groups in the account. If you omit this parameter, the default of ALL is used.
        public let scope: Scope?
        /// Use this parameter to apply the new policy to a subset of log groups in the account. Specifying selectionCriteria is valid only when you specify SUBSCRIPTION_FILTER_POLICY, FIELD_INDEX_POLICY or TRANSFORMER_POLICYfor policyType. If policyType is SUBSCRIPTION_FILTER_POLICY, the only supported selectionCriteria filter is LogGroupName NOT IN []  If policyType is FIELD_INDEX_POLICY or TRANSFORMER_POLICY, the only supported selectionCriteria filter is LogGroupNamePrefix  The selectionCriteria string can be up to 25KB in length. The length is determined by using its UTF-8 bytes. Using the selectionCriteria parameter with SUBSCRIPTION_FILTER_POLICY is useful to help prevent infinite loops. For more information, see Log recursion prevention.
        public let selectionCriteria: String?

        @inlinable
        public init(policyDocument: String, policyName: String, policyType: PolicyType, scope: Scope? = nil, selectionCriteria: String? = nil) {
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.policyType = policyType
            self.scope = scope
            self.selectionCriteria = selectionCriteria
        }

        private enum CodingKeys: String, CodingKey {
            case policyDocument = "policyDocument"
            case policyName = "policyName"
            case policyType = "policyType"
            case scope = "scope"
            case selectionCriteria = "selectionCriteria"
        }
    }

    public struct PutAccountPolicyResponse: AWSDecodableShape {
        /// The account policy that you created.
        public let accountPolicy: AccountPolicy?

        @inlinable
        public init(accountPolicy: AccountPolicy? = nil) {
            self.accountPolicy = accountPolicy
        }

        private enum CodingKeys: String, CodingKey {
            case accountPolicy = "accountPolicy"
        }
    }

    public struct PutDataProtectionPolicyRequest: AWSEncodableShape {
        /// Specify either the log group name or log group ARN.
        public let logGroupIdentifier: String
        /// Specify the data protection policy, in JSON. This policy must include two JSON blocks:   The first block must include both a DataIdentifer array and an Operation property with an Audit action. The DataIdentifer array lists the types of sensitive data that you want to mask. For more information about the available options, see Types of data that you can mask. The Operation property with an Audit action is required to find the sensitive data terms. This Audit action must contain a FindingsDestination object. You can optionally use that FindingsDestination object to list one or more destinations to send audit findings to. If you specify destinations such as log groups, Firehose streams, and S3 buckets, they must already exist.   The second block must include both a DataIdentifer array and an Operation property with an Deidentify action. The DataIdentifer array must exactly match the DataIdentifer array in the first block of the policy. The Operation property with the Deidentify action is what actually masks the data, and it must contain the  "MaskConfig": {} object. The  "MaskConfig": {} object must be empty.   For an example data protection policy, see the Examples section on this page.  The contents of the two DataIdentifer arrays must match exactly.  In addition to the two JSON blocks, the policyDocument can also include Name, Description, and Version fields. The Name is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch. The JSON specified in policyDocument can be up to 30,720 characters.
        public let policyDocument: String

        @inlinable
        public init(logGroupIdentifier: String, policyDocument: String) {
            self.logGroupIdentifier = logGroupIdentifier
            self.policyDocument = policyDocument
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
            case policyDocument = "policyDocument"
        }
    }

    public struct PutDataProtectionPolicyResponse: AWSDecodableShape {
        /// The date and time that this policy was most recently updated.
        public let lastUpdatedTime: Int64?
        /// The log group name or ARN that you specified in your request.
        public let logGroupIdentifier: String?
        /// The data protection policy used for this log group.
        public let policyDocument: String?

        @inlinable
        public init(lastUpdatedTime: Int64? = nil, logGroupIdentifier: String? = nil, policyDocument: String? = nil) {
            self.lastUpdatedTime = lastUpdatedTime
            self.logGroupIdentifier = logGroupIdentifier
            self.policyDocument = policyDocument
        }

        private enum CodingKeys: String, CodingKey {
            case lastUpdatedTime = "lastUpdatedTime"
            case logGroupIdentifier = "logGroupIdentifier"
            case policyDocument = "policyDocument"
        }
    }

    public struct PutDeliveryDestinationPolicyRequest: AWSEncodableShape {
        /// The name of the delivery destination to assign this policy to.
        public let deliveryDestinationName: String
        /// The contents of the policy.
        public let deliveryDestinationPolicy: String

        @inlinable
        public init(deliveryDestinationName: String, deliveryDestinationPolicy: String) {
            self.deliveryDestinationName = deliveryDestinationName
            self.deliveryDestinationPolicy = deliveryDestinationPolicy
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, max: 60)
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, min: 1)
            try self.validate(self.deliveryDestinationName, name: "deliveryDestinationName", parent: name, pattern: "^[\\w-]*$")
            try self.validate(self.deliveryDestinationPolicy, name: "deliveryDestinationPolicy", parent: name, max: 51200)
            try self.validate(self.deliveryDestinationPolicy, name: "deliveryDestinationPolicy", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestinationName = "deliveryDestinationName"
            case deliveryDestinationPolicy = "deliveryDestinationPolicy"
        }
    }

    public struct PutDeliveryDestinationPolicyResponse: AWSDecodableShape {
        /// The contents of the policy that you just created.
        public let policy: Policy?

        @inlinable
        public init(policy: Policy? = nil) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "policy"
        }
    }

    public struct PutDeliveryDestinationRequest: AWSEncodableShape {
        /// A structure that contains the ARN of the Amazon Web Services resource that will receive the logs.   deliveryDestinationConfiguration is required for CloudWatch Logs, Amazon S3, Firehose log delivery destinations and not required for X-Ray trace delivery destinations. deliveryDestinationType is needed for X-Ray trace delivery destinations but not required for other logs delivery destinations.
        public let deliveryDestinationConfiguration: DeliveryDestinationConfiguration?
        /// The type of delivery destination. This parameter specifies the target service where log data will be delivered. Valid values include:    S3 - Amazon S3 for long-term storage and analytics    CWL - CloudWatch Logs for centralized log management    FH - Amazon Kinesis Data Firehose for real-time data streaming    XRAY - Amazon Web Services X-Ray for distributed tracing and application monitoring   The delivery destination type determines the format and configuration options available for log delivery.
        public let deliveryDestinationType: DeliveryDestinationType?
        /// A name for this delivery destination. This name must be unique for all delivery destinations in your account.
        public let name: String
        /// The format for the logs that this delivery destination will receive.
        public let outputFormat: OutputFormat?
        /// An optional list of key-value pairs to associate with the resource. For more information about tagging, see Tagging Amazon Web Services resources
        public let tags: [String: String]?

        @inlinable
        public init(deliveryDestinationConfiguration: DeliveryDestinationConfiguration? = nil, deliveryDestinationType: DeliveryDestinationType? = nil, name: String, outputFormat: OutputFormat? = nil, tags: [String: String]? = nil) {
            self.deliveryDestinationConfiguration = deliveryDestinationConfiguration
            self.deliveryDestinationType = deliveryDestinationType
            self.name = name
            self.outputFormat = outputFormat
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 60)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w-]*$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestinationConfiguration = "deliveryDestinationConfiguration"
            case deliveryDestinationType = "deliveryDestinationType"
            case name = "name"
            case outputFormat = "outputFormat"
            case tags = "tags"
        }
    }

    public struct PutDeliveryDestinationResponse: AWSDecodableShape {
        /// A structure containing information about the delivery destination that you just created or updated.
        public let deliveryDestination: DeliveryDestination?

        @inlinable
        public init(deliveryDestination: DeliveryDestination? = nil) {
            self.deliveryDestination = deliveryDestination
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryDestination = "deliveryDestination"
        }
    }

    public struct PutDeliverySourceRequest: AWSEncodableShape {
        /// Defines the type of log that the source is sending.   For Amazon Bedrock, the valid value is APPLICATION_LOGS and TRACES.   For CloudFront, the valid value is ACCESS_LOGS.   For Amazon CodeWhisperer, the valid value is EVENT_LOGS.   For Elemental MediaPackage, the valid values are EGRESS_ACCESS_LOGS and INGRESS_ACCESS_LOGS.   For Elemental MediaTailor, the valid values are AD_DECISION_SERVER_LOGS, MANIFEST_SERVICE_LOGS, and TRANSCODE_LOGS.   For Entity Resolution, the valid value is WORKFLOW_LOGS.   For IAM Identity Center, the valid value is ERROR_LOGS.   For PCS, the valid values are PCS_SCHEDULER_LOGS and PCS_JOBCOMP_LOGS.   For Amazon Q, the valid value is EVENT_LOGS.   For Amazon SES mail manager, the valid values are APPLICATION_LOG and TRAFFIC_POLICY_DEBUG_LOGS.   For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, WORKMAIL_MAILBOX_ACCESS_LOGS, and WORKMAIL_PERSONAL_ACCESS_TOKEN_LOGS.   For Amazon VPC Route Server, the valid value is EVENT_LOGS.
        public let logType: String
        /// A name for this delivery source. This name must be unique for all delivery sources in your account.
        public let name: String
        /// The ARN of the Amazon Web Services resource that is generating and sending logs. For example, arn:aws:workmail:us-east-1:123456789012:organization/m-1234EXAMPLEabcd1234abcd1234abcd1234
        public let resourceArn: String
        /// An optional list of key-value pairs to associate with the resource. For more information about tagging, see Tagging Amazon Web Services resources
        public let tags: [String: String]?

        @inlinable
        public init(logType: String, name: String, resourceArn: String, tags: [String: String]? = nil) {
            self.logType = logType
            self.name = name
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.logType, name: "logType", parent: name, max: 255)
            try self.validate(self.logType, name: "logType", parent: name, min: 1)
            try self.validate(self.logType, name: "logType", parent: name, pattern: "^[\\w]*$")
            try self.validate(self.name, name: "name", parent: name, max: 60)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w-]*$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logType = "logType"
            case name = "name"
            case resourceArn = "resourceArn"
            case tags = "tags"
        }
    }

    public struct PutDeliverySourceResponse: AWSDecodableShape {
        /// A structure containing information about the delivery source that was just created or updated.
        public let deliverySource: DeliverySource?

        @inlinable
        public init(deliverySource: DeliverySource? = nil) {
            self.deliverySource = deliverySource
        }

        private enum CodingKeys: String, CodingKey {
            case deliverySource = "deliverySource"
        }
    }

    public struct PutDestinationPolicyRequest: AWSEncodableShape {
        /// An IAM policy document that authorizes cross-account users to deliver their log events to the associated destination. This can be up to 5120 bytes.
        public let accessPolicy: String
        /// A name for an existing destination.
        public let destinationName: String
        /// Specify true if you are updating an existing destination policy to grant permission to an organization ID instead of granting permission to individual Amazon Web Services accounts. Before you update a destination policy this way, you must first update the subscription filters in the accounts that send logs to this destination. If you do not, the subscription filters might stop working. By specifying true for forceUpdate, you are affirming that you have already updated the subscription filters. For more information, see  Updating an existing cross-account subscription  If you omit this parameter, the default of false is used.
        public let forceUpdate: Bool?

        @inlinable
        public init(accessPolicy: String, destinationName: String, forceUpdate: Bool? = nil) {
            self.accessPolicy = accessPolicy
            self.destinationName = destinationName
            self.forceUpdate = forceUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.accessPolicy, name: "accessPolicy", parent: name, min: 1)
            try self.validate(self.destinationName, name: "destinationName", parent: name, max: 512)
            try self.validate(self.destinationName, name: "destinationName", parent: name, min: 1)
            try self.validate(self.destinationName, name: "destinationName", parent: name, pattern: "^[^:*]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessPolicy = "accessPolicy"
            case destinationName = "destinationName"
            case forceUpdate = "forceUpdate"
        }
    }

    public struct PutDestinationRequest: AWSEncodableShape {
        /// A name for the destination.
        public let destinationName: String
        /// The ARN of an IAM role that grants CloudWatch Logs permissions to call the Amazon Kinesis PutRecord operation on the destination stream.
        public let roleArn: String
        /// An optional list of key-value pairs to associate with the resource. For more information about tagging, see Tagging Amazon Web Services resources
        public let tags: [String: String]?
        /// The ARN of an Amazon Kinesis stream to which to deliver matching log events.
        public let targetArn: String

        @inlinable
        public init(destinationName: String, roleArn: String, tags: [String: String]? = nil, targetArn: String) {
            self.destinationName = destinationName
            self.roleArn = roleArn
            self.tags = tags
            self.targetArn = targetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.destinationName, name: "destinationName", parent: name, max: 512)
            try self.validate(self.destinationName, name: "destinationName", parent: name, min: 1)
            try self.validate(self.destinationName, name: "destinationName", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
            try self.validate(self.targetArn, name: "targetArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case destinationName = "destinationName"
            case roleArn = "roleArn"
            case tags = "tags"
            case targetArn = "targetArn"
        }
    }

    public struct PutDestinationResponse: AWSDecodableShape {
        /// The destination.
        public let destination: Destination?

        @inlinable
        public init(destination: Destination? = nil) {
            self.destination = destination
        }

        private enum CodingKeys: String, CodingKey {
            case destination = "destination"
        }
    }

    public struct PutIndexPolicyRequest: AWSEncodableShape {
        /// Specify either the log group name or log group ARN to apply this field index policy to. If you specify an ARN, use the format arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end.
        public let logGroupIdentifier: String
        /// The index policy document, in JSON format. The following is an example of an index policy document that creates two indexes, RequestId and TransactionId.  "policyDocument": "{ "Fields": [ "RequestId", "TransactionId" ] }"  The policy document must include at least one field index. For more information about the fields that can be included and other restrictions, see Field index syntax and quotas.
        public let policyDocument: String

        @inlinable
        public init(logGroupIdentifier: String, policyDocument: String) {
            self.logGroupIdentifier = logGroupIdentifier
            self.policyDocument = policyDocument
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.policyDocument, name: "policyDocument", parent: name, max: 5120)
            try self.validate(self.policyDocument, name: "policyDocument", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
            case policyDocument = "policyDocument"
        }
    }

    public struct PutIndexPolicyResponse: AWSDecodableShape {
        /// The index policy that you just created or updated.
        public let indexPolicy: IndexPolicy?

        @inlinable
        public init(indexPolicy: IndexPolicy? = nil) {
            self.indexPolicy = indexPolicy
        }

        private enum CodingKeys: String, CodingKey {
            case indexPolicy = "indexPolicy"
        }
    }

    public struct PutIntegrationRequest: AWSEncodableShape {
        /// A name for the integration.
        public let integrationName: String
        /// The type of integration. Currently, the only supported type is OPENSEARCH.
        public let integrationType: IntegrationType
        /// A structure that contains configuration information for the integration that you are creating.
        public let resourceConfig: ResourceConfig

        @inlinable
        public init(integrationName: String, integrationType: IntegrationType, resourceConfig: ResourceConfig) {
            self.integrationName = integrationName
            self.integrationType = integrationType
            self.resourceConfig = resourceConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.integrationName, name: "integrationName", parent: name, max: 50)
            try self.validate(self.integrationName, name: "integrationName", parent: name, min: 1)
            try self.validate(self.integrationName, name: "integrationName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.resourceConfig.validate(name: "\(name).resourceConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case integrationName = "integrationName"
            case integrationType = "integrationType"
            case resourceConfig = "resourceConfig"
        }
    }

    public struct PutIntegrationResponse: AWSDecodableShape {
        /// The name of the integration that you just created.
        public let integrationName: String?
        /// The status of the integration that you just created. After you create an integration, it takes a few minutes to complete. During this time, you'll see the status as PROVISIONING.
        public let integrationStatus: IntegrationStatus?

        @inlinable
        public init(integrationName: String? = nil, integrationStatus: IntegrationStatus? = nil) {
            self.integrationName = integrationName
            self.integrationStatus = integrationStatus
        }

        private enum CodingKeys: String, CodingKey {
            case integrationName = "integrationName"
            case integrationStatus = "integrationStatus"
        }
    }

    public struct PutLogEventsRequest: AWSEncodableShape {
        /// The entity associated with the log events.
        public let entity: Entity?
        /// The log events.
        public let logEvents: [InputLogEvent]
        /// The name of the log group.
        public let logGroupName: String
        /// The name of the log stream.
        public let logStreamName: String
        /// The sequence token obtained from the response of the previous PutLogEvents call.  The sequenceToken parameter is now ignored in PutLogEvents actions. PutLogEvents actions are now accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid.
        public let sequenceToken: String?

        @inlinable
        public init(entity: Entity? = nil, logEvents: [InputLogEvent], logGroupName: String, logStreamName: String, sequenceToken: String? = nil) {
            self.entity = entity
            self.logEvents = logEvents
            self.logGroupName = logGroupName
            self.logStreamName = logStreamName
            self.sequenceToken = sequenceToken
        }

        public func validate(name: String) throws {
            try self.entity?.validate(name: "\(name).entity")
            try self.logEvents.forEach {
                try $0.validate(name: "\(name).logEvents[]")
            }
            try self.validate(self.logEvents, name: "logEvents", parent: name, max: 10000)
            try self.validate(self.logEvents, name: "logEvents", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, max: 512)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, min: 1)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.sequenceToken, name: "sequenceToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entity = "entity"
            case logEvents = "logEvents"
            case logGroupName = "logGroupName"
            case logStreamName = "logStreamName"
            case sequenceToken = "sequenceToken"
        }
    }

    public struct PutLogEventsResponse: AWSDecodableShape {
        /// The next sequence token.  This field has been deprecated. The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted even if the sequence token is not valid. You can use parallel PutLogEvents actions on the same log stream and you do not need to wait for the response of a previous PutLogEvents action to obtain the nextSequenceToken value.
        public let nextSequenceToken: String?
        /// Information about why the entity is rejected when calling PutLogEvents. Only returned when the entity is rejected.  When the entity is rejected, the events may still be accepted.
        public let rejectedEntityInfo: RejectedEntityInfo?
        /// The rejected events.
        public let rejectedLogEventsInfo: RejectedLogEventsInfo?

        @inlinable
        public init(nextSequenceToken: String? = nil, rejectedEntityInfo: RejectedEntityInfo? = nil, rejectedLogEventsInfo: RejectedLogEventsInfo? = nil) {
            self.nextSequenceToken = nextSequenceToken
            self.rejectedEntityInfo = rejectedEntityInfo
            self.rejectedLogEventsInfo = rejectedLogEventsInfo
        }

        private enum CodingKeys: String, CodingKey {
            case nextSequenceToken = "nextSequenceToken"
            case rejectedEntityInfo = "rejectedEntityInfo"
            case rejectedLogEventsInfo = "rejectedLogEventsInfo"
        }
    }

    public struct PutMetricFilterRequest: AWSEncodableShape {
        /// This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If the log group uses either a log-group level or account-level transformer, and you specify true, the metric filter will be applied on the transformed version of the log events instead of the original ingested log events.
        public let applyOnTransformedLogs: Bool?
        /// A list of system fields to emit as additional dimensions in the generated metrics. Valid values are @aws.account and @aws.region. These dimensions help identify the source of centralized log data and count toward the total dimension limit for metric filters.
        public let emitSystemFieldDimensions: [String]?
        /// A filter expression that specifies which log events should be processed by this metric filter based on system fields such as source account and source region. Uses selection criteria syntax with operators like =, !=, AND, OR, IN, NOT IN. Example: @aws.region = "us-east-1" or @aws.account IN ["123456789012", "987654321098"]. Maximum length: 2000 characters.
        public let fieldSelectionCriteria: String?
        /// A name for the metric filter.
        public let filterName: String
        /// A filter pattern for extracting metric data out of ingested log events.
        public let filterPattern: String
        /// The name of the log group.
        public let logGroupName: String
        /// A collection of information that defines how metric data gets emitted.
        public let metricTransformations: [MetricTransformation]

        @inlinable
        public init(applyOnTransformedLogs: Bool? = nil, emitSystemFieldDimensions: [String]? = nil, fieldSelectionCriteria: String? = nil, filterName: String, filterPattern: String, logGroupName: String, metricTransformations: [MetricTransformation]) {
            self.applyOnTransformedLogs = applyOnTransformedLogs
            self.emitSystemFieldDimensions = emitSystemFieldDimensions
            self.fieldSelectionCriteria = fieldSelectionCriteria
            self.filterName = filterName
            self.filterPattern = filterPattern
            self.logGroupName = logGroupName
            self.metricTransformations = metricTransformations
        }

        public func validate(name: String) throws {
            try self.validate(self.fieldSelectionCriteria, name: "fieldSelectionCriteria", parent: name, max: 2000)
            try self.validate(self.filterName, name: "filterName", parent: name, max: 512)
            try self.validate(self.filterName, name: "filterName", parent: name, min: 1)
            try self.validate(self.filterName, name: "filterName", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.filterPattern, name: "filterPattern", parent: name, max: 1024)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.metricTransformations.forEach {
                try $0.validate(name: "\(name).metricTransformations[]")
            }
            try self.validate(self.metricTransformations, name: "metricTransformations", parent: name, max: 1)
            try self.validate(self.metricTransformations, name: "metricTransformations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applyOnTransformedLogs = "applyOnTransformedLogs"
            case emitSystemFieldDimensions = "emitSystemFieldDimensions"
            case fieldSelectionCriteria = "fieldSelectionCriteria"
            case filterName = "filterName"
            case filterPattern = "filterPattern"
            case logGroupName = "logGroupName"
            case metricTransformations = "metricTransformations"
        }
    }

    public struct PutQueryDefinitionRequest: AWSEncodableShape {
        /// Used as an idempotency token, to avoid returning an exception if the service receives the same request twice because of a network error.
        public let clientToken: String?
        /// Use this parameter to include specific log groups as part of your query definition. If your query uses the OpenSearch Service query language, you specify the log group names inside the querystring instead of here. If you are updating an existing query definition for the Logs Insights QL or OpenSearch Service PPL and you omit this parameter, then the updated definition will contain no log groups.
        public let logGroupNames: [String]?
        /// A name for the query definition. If you are saving numerous query definitions, we recommend that you name them. This way, you can find the ones you want by using the first part of the name as a filter in the queryDefinitionNamePrefix parameter of DescribeQueryDefinitions.
        public let name: String
        /// If you are updating a query definition, use this parameter to specify the ID of the query definition that you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the new query definition and include it in the response to this operation.
        public let queryDefinitionId: String?
        /// Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, see Supported query languages.
        public let queryLanguage: QueryLanguage?
        /// The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.
        public let queryString: String

        @inlinable
        public init(clientToken: String? = PutQueryDefinitionRequest.idempotencyToken(), logGroupNames: [String]? = nil, name: String, queryDefinitionId: String? = nil, queryLanguage: QueryLanguage? = nil, queryString: String) {
            self.clientToken = clientToken
            self.logGroupNames = logGroupNames
            self.name = name
            self.queryDefinitionId = queryDefinitionId
            self.queryLanguage = queryLanguage
            self.queryString = queryString
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 128)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,128}$")
            try self.logGroupNames?.forEach {
                try validate($0, name: "logGroupNames[]", parent: name, max: 512)
                try validate($0, name: "logGroupNames[]", parent: name, min: 1)
                try validate($0, name: "logGroupNames[]", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            }
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.queryDefinitionId, name: "queryDefinitionId", parent: name, max: 256)
            try self.validate(self.queryDefinitionId, name: "queryDefinitionId", parent: name, min: 1)
            try self.validate(self.queryString, name: "queryString", parent: name, max: 10000)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case logGroupNames = "logGroupNames"
            case name = "name"
            case queryDefinitionId = "queryDefinitionId"
            case queryLanguage = "queryLanguage"
            case queryString = "queryString"
        }
    }

    public struct PutQueryDefinitionResponse: AWSDecodableShape {
        /// The ID of the query definition.
        public let queryDefinitionId: String?

        @inlinable
        public init(queryDefinitionId: String? = nil) {
            self.queryDefinitionId = queryDefinitionId
        }

        private enum CodingKeys: String, CodingKey {
            case queryDefinitionId = "queryDefinitionId"
        }
    }

    public struct PutResourcePolicyRequest: AWSEncodableShape {
        /// The expected revision ID of the resource policy. Required when resourceArn is provided to prevent concurrent modifications. Use null when creating a resource policy for the first time.
        public let expectedRevisionId: String?
        /// Details of the new policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. This parameter is required. The following example creates a resource policy enabling the Route 53 service to put DNS query logs in to the specified log group. Replace "logArn" with the ARN of your CloudWatch Logs resource, such as a log group or log stream. CloudWatch Logs also supports aws:SourceArn and aws:SourceAccount condition context keys. In the example resource policy, you would replace the value of SourceArn with the resource making the call from Route 53 to CloudWatch Logs. You would also replace the value of SourceAccount with the Amazon Web Services account ID making that call.   { "Version": "2012-10-17", "Statement": [ { "Sid": "Route53LogsToCloudWatchLogs", "Effect": "Allow", "Principal": { "Service": [ "route53.amazonaws.com" ] }, "Action": "logs:PutLogEvents", "Resource": "logArn", "Condition": { "ArnLike": { "aws:SourceArn": "myRoute53ResourceArn" }, "StringEquals": { "aws:SourceAccount": "myAwsAccountId" } } } ] }
        public let policyDocument: String?
        /// Name of the new policy. This parameter is required.
        public let policyName: String?
        /// The ARN of the CloudWatch Logs resource to which the resource policy needs to be added or attached. Currently only supports LogGroup ARN.
        public let resourceArn: String?

        @inlinable
        public init(expectedRevisionId: String? = nil, policyDocument: String? = nil, policyName: String? = nil, resourceArn: String? = nil) {
            self.expectedRevisionId = expectedRevisionId
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, min: 1)
            try self.validate(self.policyDocument, name: "policyDocument", parent: name, max: 5120)
            try self.validate(self.policyDocument, name: "policyDocument", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case expectedRevisionId = "expectedRevisionId"
            case policyDocument = "policyDocument"
            case policyName = "policyName"
            case resourceArn = "resourceArn"
        }
    }

    public struct PutResourcePolicyResponse: AWSDecodableShape {
        /// The new policy.
        public let resourcePolicy: ResourcePolicy?
        /// The revision ID of the created or updated resource policy. Only returned for resource-scoped policies.
        public let revisionId: String?

        @inlinable
        public init(resourcePolicy: ResourcePolicy? = nil, revisionId: String? = nil) {
            self.resourcePolicy = resourcePolicy
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case resourcePolicy = "resourcePolicy"
            case revisionId = "revisionId"
        }
    }

    public struct PutRetentionPolicyRequest: AWSEncodableShape {
        /// The name of the log group.
        public let logGroupName: String
        public let retentionInDays: Int

        @inlinable
        public init(logGroupName: String, retentionInDays: Int) {
            self.logGroupName = logGroupName
            self.retentionInDays = retentionInDays
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case retentionInDays = "retentionInDays"
        }
    }

    public struct PutSubscriptionFilterRequest: AWSEncodableShape {
        /// This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If the log group uses either a log-group level or account-level transformer, and you specify true, the subscription filter will be applied on the transformed version of the log events instead of the original ingested log events.
        public let applyOnTransformedLogs: Bool?
        /// The ARN of the destination to deliver matching log events to. Currently, the supported destinations are:   An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery.   A logical destination (specified using an ARN) belonging to a different account, for cross-account delivery. If you're setting up a cross-account subscription, the destination must have an IAM policy associated with it. The IAM policy must allow the sender to send logs to the destination. For more information, see PutDestinationPolicy.   A Kinesis Data Firehose delivery stream belonging to the same account as the subscription filter, for same-account delivery.   A Lambda function belonging to the same account as the subscription filter, for same-account delivery.
        public let destinationArn: String
        /// The method used to distribute log data to the destination. By default, log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis data stream.
        public let distribution: Distribution?
        /// A list of system fields to include in the log events sent to the subscription destination. Valid values are @aws.account and @aws.region. These fields provide source information for centralized log data in the forwarded payload.
        public let emitSystemFields: [String]?
        /// A filter expression that specifies which log events should be processed by this subscription filter based on system fields such as source account and source region. Uses selection criteria syntax with operators like =, !=, AND, OR, IN, NOT IN. Example: @aws.region NOT IN ["cn-north-1"] or @aws.account = "123456789012" AND @aws.region = "us-east-1". Maximum length: 2000 characters.
        public let fieldSelectionCriteria: String?
        /// A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters.
        public let filterName: String
        /// A filter pattern for subscribing to a filtered stream of log events.
        public let filterPattern: String
        /// The name of the log group.
        public let logGroupName: String
        /// The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
        public let roleArn: String?

        @inlinable
        public init(applyOnTransformedLogs: Bool? = nil, destinationArn: String, distribution: Distribution? = nil, emitSystemFields: [String]? = nil, fieldSelectionCriteria: String? = nil, filterName: String, filterPattern: String, logGroupName: String, roleArn: String? = nil) {
            self.applyOnTransformedLogs = applyOnTransformedLogs
            self.destinationArn = destinationArn
            self.distribution = distribution
            self.emitSystemFields = emitSystemFields
            self.fieldSelectionCriteria = fieldSelectionCriteria
            self.filterName = filterName
            self.filterPattern = filterPattern
            self.logGroupName = logGroupName
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.destinationArn, name: "destinationArn", parent: name, min: 1)
            try self.validate(self.fieldSelectionCriteria, name: "fieldSelectionCriteria", parent: name, max: 2000)
            try self.validate(self.filterName, name: "filterName", parent: name, max: 512)
            try self.validate(self.filterName, name: "filterName", parent: name, min: 1)
            try self.validate(self.filterName, name: "filterName", parent: name, pattern: "^[^:*]*$")
            try self.validate(self.filterPattern, name: "filterPattern", parent: name, max: 1024)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applyOnTransformedLogs = "applyOnTransformedLogs"
            case destinationArn = "destinationArn"
            case distribution = "distribution"
            case emitSystemFields = "emitSystemFields"
            case fieldSelectionCriteria = "fieldSelectionCriteria"
            case filterName = "filterName"
            case filterPattern = "filterPattern"
            case logGroupName = "logGroupName"
            case roleArn = "roleArn"
        }
    }

    public struct PutTransformerRequest: AWSEncodableShape {
        /// Specify either the name or ARN of the log group to create the transformer for.
        public let logGroupIdentifier: String
        /// This structure contains the configuration of this log transformer. A log transformer is an array of processors, where each processor applies one type of transformation to the log events that are ingested.
        public let transformerConfig: [Processor]

        @inlinable
        public init(logGroupIdentifier: String, transformerConfig: [Processor]) {
            self.logGroupIdentifier = logGroupIdentifier
            self.transformerConfig = transformerConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, max: 2048)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, min: 1)
            try self.validate(self.logGroupIdentifier, name: "logGroupIdentifier", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.transformerConfig.forEach {
                try $0.validate(name: "\(name).transformerConfig[]")
            }
            try self.validate(self.transformerConfig, name: "transformerConfig", parent: name, max: 20)
            try self.validate(self.transformerConfig, name: "transformerConfig", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupIdentifier = "logGroupIdentifier"
            case transformerConfig = "transformerConfig"
        }
    }

    public struct QueryCompileError: AWSDecodableShape {
        /// Reserved.
        public let location: QueryCompileErrorLocation?
        /// Reserved.
        public let message: String?

        @inlinable
        public init(location: QueryCompileErrorLocation? = nil, message: String? = nil) {
            self.location = location
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case location = "location"
            case message = "message"
        }
    }

    public struct QueryCompileErrorLocation: AWSDecodableShape {
        /// Reserved.
        public let endCharOffset: Int?
        /// Reserved.
        public let startCharOffset: Int?

        @inlinable
        public init(endCharOffset: Int? = nil, startCharOffset: Int? = nil) {
            self.endCharOffset = endCharOffset
            self.startCharOffset = startCharOffset
        }

        private enum CodingKeys: String, CodingKey {
            case endCharOffset = "endCharOffset"
            case startCharOffset = "startCharOffset"
        }
    }

    public struct QueryDefinition: AWSDecodableShape {
        /// The date that the query definition was most recently modified.
        public let lastModified: Int64?
        /// If this query definition contains a list of log groups that it is limited to, that list appears here.
        public let logGroupNames: [String]?
        /// The name of the query definition.
        public let name: String?
        /// The unique ID of the query definition.
        public let queryDefinitionId: String?
        /// The query language used for this query. For more information about the query languages that CloudWatch Logs supports, see Supported query languages.
        public let queryLanguage: QueryLanguage?
        /// The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.
        public let queryString: String?

        @inlinable
        public init(lastModified: Int64? = nil, logGroupNames: [String]? = nil, name: String? = nil, queryDefinitionId: String? = nil, queryLanguage: QueryLanguage? = nil, queryString: String? = nil) {
            self.lastModified = lastModified
            self.logGroupNames = logGroupNames
            self.name = name
            self.queryDefinitionId = queryDefinitionId
            self.queryLanguage = queryLanguage
            self.queryString = queryString
        }

        private enum CodingKeys: String, CodingKey {
            case lastModified = "lastModified"
            case logGroupNames = "logGroupNames"
            case name = "name"
            case queryDefinitionId = "queryDefinitionId"
            case queryLanguage = "queryLanguage"
            case queryString = "queryString"
        }
    }

    public struct QueryInfo: AWSDecodableShape {
        /// The date and time that this query was created.
        public let createTime: Int64?
        /// The name of the log group scanned by this query.
        public let logGroupName: String?
        /// The unique ID number of this query.
        public let queryId: String?
        /// The query language used for this query. For more information about the query languages that CloudWatch Logs supports, see Supported query languages.
        public let queryLanguage: QueryLanguage?
        /// The query string used in this query.
        public let queryString: String?
        /// The status of this query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, and Unknown.
        public let status: QueryStatus?

        @inlinable
        public init(createTime: Int64? = nil, logGroupName: String? = nil, queryId: String? = nil, queryLanguage: QueryLanguage? = nil, queryString: String? = nil, status: QueryStatus? = nil) {
            self.createTime = createTime
            self.logGroupName = logGroupName
            self.queryId = queryId
            self.queryLanguage = queryLanguage
            self.queryString = queryString
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createTime = "createTime"
            case logGroupName = "logGroupName"
            case queryId = "queryId"
            case queryLanguage = "queryLanguage"
            case queryString = "queryString"
            case status = "status"
        }
    }

    public struct QueryStatistics: AWSDecodableShape {
        /// The total number of bytes in the log events scanned during the query.
        public let bytesScanned: Double?
        /// An estimate of the number of bytes in the log events that were skipped when processing this query, because the query contained an indexed field. Skipping these entries lowers query costs and improves the query performance time. For more information about field indexes, see PutIndexPolicy.
        public let estimatedBytesSkipped: Double?
        /// An estimate of the number of log events that were skipped when processing this query, because the query contained an indexed field. Skipping these entries lowers query costs and improves the query performance time. For more information about field indexes, see PutIndexPolicy.
        public let estimatedRecordsSkipped: Double?
        /// The number of log groups that were scanned by this query.
        public let logGroupsScanned: Double?
        /// The number of log events that matched the query string.
        public let recordsMatched: Double?
        /// The total number of log events scanned during the query.
        public let recordsScanned: Double?

        @inlinable
        public init(bytesScanned: Double? = nil, estimatedBytesSkipped: Double? = nil, estimatedRecordsSkipped: Double? = nil, logGroupsScanned: Double? = nil, recordsMatched: Double? = nil, recordsScanned: Double? = nil) {
            self.bytesScanned = bytesScanned
            self.estimatedBytesSkipped = estimatedBytesSkipped
            self.estimatedRecordsSkipped = estimatedRecordsSkipped
            self.logGroupsScanned = logGroupsScanned
            self.recordsMatched = recordsMatched
            self.recordsScanned = recordsScanned
        }

        private enum CodingKeys: String, CodingKey {
            case bytesScanned = "bytesScanned"
            case estimatedBytesSkipped = "estimatedBytesSkipped"
            case estimatedRecordsSkipped = "estimatedRecordsSkipped"
            case logGroupsScanned = "logGroupsScanned"
            case recordsMatched = "recordsMatched"
            case recordsScanned = "recordsScanned"
        }
    }

    public struct RecordField: AWSDecodableShape {
        /// If this is true, the record field must be present in the recordFields parameter provided to a CreateDelivery or UpdateDeliveryConfiguration operation.
        public let mandatory: Bool?
        /// The name to use when specifying this record field in a CreateDelivery or UpdateDeliveryConfiguration operation.
        public let name: String?

        @inlinable
        public init(mandatory: Bool? = nil, name: String? = nil) {
            self.mandatory = mandatory
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case mandatory = "mandatory"
            case name = "name"
        }
    }

    public struct RejectedEntityInfo: AWSDecodableShape {
        /// The type of error that caused the rejection of the entity when calling PutLogEvents.
        public let errorType: EntityRejectionErrorType

        @inlinable
        public init(errorType: EntityRejectionErrorType) {
            self.errorType = errorType
        }

        private enum CodingKeys: String, CodingKey {
            case errorType = "errorType"
        }
    }

    public struct RejectedLogEventsInfo: AWSDecodableShape {
        /// The expired log events.
        public let expiredLogEventEndIndex: Int?
        /// The index of the first log event that is too new. This field is inclusive.
        public let tooNewLogEventStartIndex: Int?
        /// The index of the last log event that is too old. This field is exclusive.
        public let tooOldLogEventEndIndex: Int?

        @inlinable
        public init(expiredLogEventEndIndex: Int? = nil, tooNewLogEventStartIndex: Int? = nil, tooOldLogEventEndIndex: Int? = nil) {
            self.expiredLogEventEndIndex = expiredLogEventEndIndex
            self.tooNewLogEventStartIndex = tooNewLogEventStartIndex
            self.tooOldLogEventEndIndex = tooOldLogEventEndIndex
        }

        private enum CodingKeys: String, CodingKey {
            case expiredLogEventEndIndex = "expiredLogEventEndIndex"
            case tooNewLogEventStartIndex = "tooNewLogEventStartIndex"
            case tooOldLogEventEndIndex = "tooOldLogEventEndIndex"
        }
    }

    public struct RenameKeyEntry: AWSEncodableShape & AWSDecodableShape {
        /// The key to rename
        public let key: String
        /// Specifies whether to overwrite the existing value if the destination key already exists. The default is false
        public let overwriteIfExists: Bool?
        /// The string to use for the new key name
        public let renameTo: String

        @inlinable
        public init(key: String, overwriteIfExists: Bool? = nil, renameTo: String) {
            self.key = key
            self.overwriteIfExists = overwriteIfExists
            self.renameTo = renameTo
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.renameTo, name: "renameTo", parent: name, max: 128)
            try self.validate(self.renameTo, name: "renameTo", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case overwriteIfExists = "overwriteIfExists"
            case renameTo = "renameTo"
        }
    }

    public struct RenameKeys: AWSEncodableShape & AWSDecodableShape {
        /// An array of RenameKeyEntry objects, where each object contains the information about a single key to rename.
        public let entries: [RenameKeyEntry]

        @inlinable
        public init(entries: [RenameKeyEntry]) {
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 5)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "entries"
        }
    }

    public struct ResourcePolicy: AWSDecodableShape {
        /// Timestamp showing when this policy was last updated, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let lastUpdatedTime: Int64?
        /// The details of the policy.
        public let policyDocument: String?
        /// The name of the resource policy.
        public let policyName: String?
        /// Specifies scope of the resource policy. Valid values are ACCOUNT or RESOURCE.
        public let policyScope: PolicyScope?
        /// The ARN of the CloudWatch Logs resource to which the resource policy is attached. Only populated for resource-scoped policies.
        public let resourceArn: String?
        /// The revision ID of the resource policy. Only populated for resource-scoped policies.
        public let revisionId: String?

        @inlinable
        public init(lastUpdatedTime: Int64? = nil, policyDocument: String? = nil, policyName: String? = nil, policyScope: PolicyScope? = nil, resourceArn: String? = nil, revisionId: String? = nil) {
            self.lastUpdatedTime = lastUpdatedTime
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.policyScope = policyScope
            self.resourceArn = resourceArn
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case lastUpdatedTime = "lastUpdatedTime"
            case policyDocument = "policyDocument"
            case policyName = "policyName"
            case policyScope = "policyScope"
            case resourceArn = "resourceArn"
            case revisionId = "revisionId"
        }
    }

    public struct ResultField: AWSDecodableShape {
        /// The log event field.
        public let field: String?
        /// The value of this field.
        public let value: String?

        @inlinable
        public init(field: String? = nil, value: String? = nil) {
            self.field = field
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case field = "field"
            case value = "value"
        }
    }

    public struct S3DeliveryConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// This parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.
        public let enableHiveCompatiblePath: Bool?
        /// This string allows re-configuring the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source. To find the values supported for the suffix path for each log source, use the DescribeConfigurationTemplates operation and check the allowedSuffixPathFields field in the response.
        public let suffixPath: String?

        @inlinable
        public init(enableHiveCompatiblePath: Bool? = nil, suffixPath: String? = nil) {
            self.enableHiveCompatiblePath = enableHiveCompatiblePath
            self.suffixPath = suffixPath
        }

        public func validate(name: String) throws {
            try self.validate(self.suffixPath, name: "suffixPath", parent: name, max: 256)
            try self.validate(self.suffixPath, name: "suffixPath", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case enableHiveCompatiblePath = "enableHiveCompatiblePath"
            case suffixPath = "suffixPath"
        }
    }

    public struct SearchedLogStream: AWSDecodableShape {
        /// The name of the log stream.
        public let logStreamName: String?
        /// Indicates whether all the events in this log stream were searched.
        public let searchedCompletely: Bool?

        @inlinable
        public init(logStreamName: String? = nil, searchedCompletely: Bool? = nil) {
            self.logStreamName = logStreamName
            self.searchedCompletely = searchedCompletely
        }

        private enum CodingKeys: String, CodingKey {
            case logStreamName = "logStreamName"
            case searchedCompletely = "searchedCompletely"
        }
    }

    public struct SessionStreamingException: AWSDecodableShape {
        public let message: String?

        @inlinable
        public init(message: String? = nil) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
        }
    }

    public struct SessionTimeoutException: AWSDecodableShape {
        public let message: String?

        @inlinable
        public init(message: String? = nil) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
        }
    }

    public struct SplitString: AWSEncodableShape & AWSDecodableShape {
        /// An array of SplitStringEntry objects, where each object contains the information about one field to split.
        public let entries: [SplitStringEntry]

        @inlinable
        public init(entries: [SplitStringEntry]) {
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 10)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "entries"
        }
    }

    public struct SplitStringEntry: AWSEncodableShape & AWSDecodableShape {
        /// The separator characters to split the string entry on.
        public let delimiter: String
        /// The key of the field to split.
        public let source: String

        @inlinable
        public init(delimiter: String, source: String) {
            self.delimiter = delimiter
            self.source = source
        }

        public func validate(name: String) throws {
            try self.validate(self.delimiter, name: "delimiter", parent: name, max: 128)
            try self.validate(self.delimiter, name: "delimiter", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case delimiter = "delimiter"
            case source = "source"
        }
    }

    public struct StartLiveTailRequest: AWSEncodableShape {
        /// An optional pattern to use to filter the results to include only log events that match the pattern. For example, a filter pattern of error 404 causes only log events that include both error and 404 to be included in the Live Tail stream. Regular expression filter patterns are supported. For more information about filter pattern syntax, see Filter and Pattern Syntax.
        public let logEventFilterPattern: String?
        /// An array where each item in the array is a log group to include in the Live Tail session. Specify each log group by its ARN.  If you specify an ARN, the ARN can't end with an asterisk (*).  You can include up to 10 log groups.
        public let logGroupIdentifiers: [String]
        /// If you specify this parameter, then only log events in the log streams that have names that start with the prefixes that you specify here are included in the Live Tail session. If you specify this field, you can't also specify the logStreamNames field.  You can specify this parameter only if you specify only one log group in logGroupIdentifiers.
        public let logStreamNamePrefixes: [String]?
        /// If you specify this parameter, then only log events in the log streams that you specify here are included in the Live Tail session. If you specify this field, you can't also specify the logStreamNamePrefixes field.  You can specify this parameter only if you specify only one log group in logGroupIdentifiers.
        public let logStreamNames: [String]?

        @inlinable
        public init(logEventFilterPattern: String? = nil, logGroupIdentifiers: [String], logStreamNamePrefixes: [String]? = nil, logStreamNames: [String]? = nil) {
            self.logEventFilterPattern = logEventFilterPattern
            self.logGroupIdentifiers = logGroupIdentifiers
            self.logStreamNamePrefixes = logStreamNamePrefixes
            self.logStreamNames = logStreamNames
        }

        public func validate(name: String) throws {
            try self.validate(self.logEventFilterPattern, name: "logEventFilterPattern", parent: name, max: 1024)
            try self.logGroupIdentifiers.forEach {
                try validate($0, name: "logGroupIdentifiers[]", parent: name, max: 2048)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            }
            try self.validate(self.logGroupIdentifiers, name: "logGroupIdentifiers", parent: name, max: 10)
            try self.validate(self.logGroupIdentifiers, name: "logGroupIdentifiers", parent: name, min: 1)
            try self.logStreamNamePrefixes?.forEach {
                try validate($0, name: "logStreamNamePrefixes[]", parent: name, max: 512)
                try validate($0, name: "logStreamNamePrefixes[]", parent: name, min: 1)
                try validate($0, name: "logStreamNamePrefixes[]", parent: name, pattern: "^[^:*]*$")
            }
            try self.validate(self.logStreamNamePrefixes, name: "logStreamNamePrefixes", parent: name, max: 100)
            try self.validate(self.logStreamNamePrefixes, name: "logStreamNamePrefixes", parent: name, min: 1)
            try self.logStreamNames?.forEach {
                try validate($0, name: "logStreamNames[]", parent: name, max: 512)
                try validate($0, name: "logStreamNames[]", parent: name, min: 1)
                try validate($0, name: "logStreamNames[]", parent: name, pattern: "^[^:*]*$")
            }
            try self.validate(self.logStreamNames, name: "logStreamNames", parent: name, max: 100)
            try self.validate(self.logStreamNames, name: "logStreamNames", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logEventFilterPattern = "logEventFilterPattern"
            case logGroupIdentifiers = "logGroupIdentifiers"
            case logStreamNamePrefixes = "logStreamNamePrefixes"
            case logStreamNames = "logStreamNames"
        }
    }

    public struct StartLiveTailResponse: AWSDecodableShape {
        /// An object that includes the stream returned by your request. It can include both log events and exceptions.
        public let responseStream: AWSEventStream<StartLiveTailResponseStream>?

        @inlinable
        public init(responseStream: AWSEventStream<StartLiveTailResponseStream>? = nil) {
            self.responseStream = responseStream
        }

        public init(from decoder: Decoder) throws {
            let container = try decoder.singleValueContainer()
            self.responseStream = try container.decode(AWSEventStream<StartLiveTailResponseStream>.self)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StartQueryRequest: AWSEncodableShape {
        /// The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.
        public let endTime: Int64
        /// The maximum number of log events to return in the query. If the query string uses the fields command, only the specified fields and their values are returned. The default is 10,000.
        public let limit: Int?
        /// The list of log groups to query. You can include up to 50 log groups. You can specify them by the log group name or ARN. If a log group that you're querying is in a source account and you're using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account. If you specify an ARN, use the format arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end. A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query language, where you specify the log group names inside the querystring instead of here.
        public let logGroupIdentifiers: [String]?
        /// The log group on which to perform the query.  A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query language, where you specify the log group names inside the querystring instead of here.
        public let logGroupName: String?
        /// The list of log groups to be queried. You can include up to 50 log groups.  A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query language, where you specify the log group names inside the querystring instead of here.
        public let logGroupNames: [String]?
        /// Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, see Supported query languages.
        public let queryLanguage: QueryLanguage?
        /// The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.
        public let queryString: String
        /// The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.
        public let startTime: Int64

        @inlinable
        public init(endTime: Int64, limit: Int? = nil, logGroupIdentifiers: [String]? = nil, logGroupName: String? = nil, logGroupNames: [String]? = nil, queryLanguage: QueryLanguage? = nil, queryString: String, startTime: Int64) {
            self.endTime = endTime
            self.limit = limit
            self.logGroupIdentifiers = logGroupIdentifiers
            self.logGroupName = logGroupName
            self.logGroupNames = logGroupNames
            self.queryLanguage = queryLanguage
            self.queryString = queryString
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.endTime, name: "endTime", parent: name, min: 0)
            try self.validate(self.limit, name: "limit", parent: name, max: 10000)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.logGroupIdentifiers?.forEach {
                try validate($0, name: "logGroupIdentifiers[]", parent: name, max: 2048)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "logGroupIdentifiers[]", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            }
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.logGroupNames?.forEach {
                try validate($0, name: "logGroupNames[]", parent: name, max: 512)
                try validate($0, name: "logGroupNames[]", parent: name, min: 1)
                try validate($0, name: "logGroupNames[]", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            }
            try self.validate(self.queryString, name: "queryString", parent: name, max: 10000)
            try self.validate(self.startTime, name: "startTime", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "endTime"
            case limit = "limit"
            case logGroupIdentifiers = "logGroupIdentifiers"
            case logGroupName = "logGroupName"
            case logGroupNames = "logGroupNames"
            case queryLanguage = "queryLanguage"
            case queryString = "queryString"
            case startTime = "startTime"
        }
    }

    public struct StartQueryResponse: AWSDecodableShape {
        /// The unique ID of the query.
        public let queryId: String?

        @inlinable
        public init(queryId: String? = nil) {
            self.queryId = queryId
        }

        private enum CodingKeys: String, CodingKey {
            case queryId = "queryId"
        }
    }

    public struct StopQueryRequest: AWSEncodableShape {
        /// The ID number of the query to stop. To find this ID number, use DescribeQueries.
        public let queryId: String

        @inlinable
        public init(queryId: String) {
            self.queryId = queryId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryId, name: "queryId", parent: name, max: 256)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queryId = "queryId"
        }
    }

    public struct StopQueryResponse: AWSDecodableShape {
        /// This is true if the query was stopped by the StopQuery operation.
        public let success: Bool?

        @inlinable
        public init(success: Bool? = nil) {
            self.success = success
        }

        private enum CodingKeys: String, CodingKey {
            case success = "success"
        }
    }

    public struct SubscriptionFilter: AWSDecodableShape {
        /// This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.
        public let applyOnTransformedLogs: Bool?
        /// The creation time of the subscription filter, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        public let creationTime: Int64?
        /// The Amazon Resource Name (ARN) of the destination.
        public let destinationArn: String?
        public let distribution: Distribution?
        /// The list of system fields that are included in the log events sent to the subscription destination. Returns the emitSystemFields value if it was specified when the subscription filter was created.
        public let emitSystemFields: [String]?
        /// The filter expression that specifies which log events are processed by this subscription filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the subscription filter was created.
        public let fieldSelectionCriteria: String?
        /// The name of the subscription filter.
        public let filterName: String?
        public let filterPattern: String?
        /// The name of the log group.
        public let logGroupName: String?
        public let roleArn: String?

        @inlinable
        public init(applyOnTransformedLogs: Bool? = nil, creationTime: Int64? = nil, destinationArn: String? = nil, distribution: Distribution? = nil, emitSystemFields: [String]? = nil, fieldSelectionCriteria: String? = nil, filterName: String? = nil, filterPattern: String? = nil, logGroupName: String? = nil, roleArn: String? = nil) {
            self.applyOnTransformedLogs = applyOnTransformedLogs
            self.creationTime = creationTime
            self.destinationArn = destinationArn
            self.distribution = distribution
            self.emitSystemFields = emitSystemFields
            self.fieldSelectionCriteria = fieldSelectionCriteria
            self.filterName = filterName
            self.filterPattern = filterPattern
            self.logGroupName = logGroupName
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case applyOnTransformedLogs = "applyOnTransformedLogs"
            case creationTime = "creationTime"
            case destinationArn = "destinationArn"
            case distribution = "distribution"
            case emitSystemFields = "emitSystemFields"
            case fieldSelectionCriteria = "fieldSelectionCriteria"
            case filterName = "filterName"
            case filterPattern = "filterPattern"
            case logGroupName = "logGroupName"
            case roleArn = "roleArn"
        }
    }

    public struct SubstituteString: AWSEncodableShape & AWSDecodableShape {
        /// An array of objects, where each object contains the information about one key to match and replace.
        public let entries: [SubstituteStringEntry]

        @inlinable
        public init(entries: [SubstituteStringEntry]) {
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 10)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "entries"
        }
    }

    public struct SubstituteStringEntry: AWSEncodableShape & AWSDecodableShape {
        /// The regular expression string to be replaced. Special regex characters such as [ and ] must be escaped using \\ when using double quotes and with \ when using single quotes. For more information, see  Class Pattern on the Oracle web site.
        public let from: String
        /// The key to modify
        public let source: String
        /// The string to be substituted for each match of from
        public let to: String

        @inlinable
        public init(from: String, source: String, to: String) {
            self.from = from
            self.source = source
            self.to = to
        }

        public func validate(name: String) throws {
            try self.validate(self.from, name: "from", parent: name, max: 128)
            try self.validate(self.from, name: "from", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, max: 128)
            try self.validate(self.source, name: "source", parent: name, min: 1)
            try self.validate(self.to, name: "to", parent: name, max: 128)
            try self.validate(self.to, name: "to", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case from = "from"
            case source = "source"
            case to = "to"
        }
    }

    public struct SuppressionPeriod: AWSEncodableShape {
        /// Specifies whether the value of value is in seconds, minutes, or hours.
        public let suppressionUnit: SuppressionUnit?
        /// Specifies the number of seconds, minutes or hours to suppress this anomaly. There is no maximum.
        public let value: Int?

        @inlinable
        public init(suppressionUnit: SuppressionUnit? = nil, value: Int? = nil) {
            self.suppressionUnit = suppressionUnit
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case suppressionUnit = "suppressionUnit"
            case value = "value"
        }
    }

    public struct TagLogGroupRequest: AWSEncodableShape {
        /// The name of the log group.
        public let logGroupName: String
        /// The key-value pairs to use for the tags.
        public let tags: [String: String]

        @inlinable
        public init(logGroupName: String, tags: [String: String]) {
            self.logGroupName = logGroupName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case tags = "tags"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of the resource that you're adding tags to. The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name   The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name   For more information about ARN format, see CloudWatch Logs resources and operations.
        public let resourceArn: String
        /// The list of key-value pairs to associate with the resource.
        public let tags: [String: String]

        @inlinable
        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^[\\w+=/:,.@-]*$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tags = "tags"
        }
    }

    public struct TestMetricFilterRequest: AWSEncodableShape {
        public let filterPattern: String
        /// The log event messages to test.
        public let logEventMessages: [String]

        @inlinable
        public init(filterPattern: String, logEventMessages: [String]) {
            self.filterPattern = filterPattern
            self.logEventMessages = logEventMessages
        }

        public func validate(name: String) throws {
            try self.validate(self.filterPattern, name: "filterPattern", parent: name, max: 1024)
            try self.logEventMessages.forEach {
                try validate($0, name: "logEventMessages[]", parent: name, min: 1)
            }
            try self.validate(self.logEventMessages, name: "logEventMessages", parent: name, max: 50)
            try self.validate(self.logEventMessages, name: "logEventMessages", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filterPattern = "filterPattern"
            case logEventMessages = "logEventMessages"
        }
    }

    public struct TestMetricFilterResponse: AWSDecodableShape {
        /// The matched events.
        public let matches: [MetricFilterMatchRecord]?

        @inlinable
        public init(matches: [MetricFilterMatchRecord]? = nil) {
            self.matches = matches
        }

        private enum CodingKeys: String, CodingKey {
            case matches = "matches"
        }
    }

    public struct TestTransformerRequest: AWSEncodableShape {
        /// An array of the raw log events that you want to use to test this transformer.
        public let logEventMessages: [String]
        /// This structure contains the configuration of this log transformer that you want to test. A log transformer is an array of processors, where each processor applies one type of transformation to the log events that are ingested.
        public let transformerConfig: [Processor]

        @inlinable
        public init(logEventMessages: [String], transformerConfig: [Processor]) {
            self.logEventMessages = logEventMessages
            self.transformerConfig = transformerConfig
        }

        public func validate(name: String) throws {
            try self.logEventMessages.forEach {
                try validate($0, name: "logEventMessages[]", parent: name, min: 1)
            }
            try self.validate(self.logEventMessages, name: "logEventMessages", parent: name, max: 50)
            try self.validate(self.logEventMessages, name: "logEventMessages", parent: name, min: 1)
            try self.transformerConfig.forEach {
                try $0.validate(name: "\(name).transformerConfig[]")
            }
            try self.validate(self.transformerConfig, name: "transformerConfig", parent: name, max: 20)
            try self.validate(self.transformerConfig, name: "transformerConfig", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logEventMessages = "logEventMessages"
            case transformerConfig = "transformerConfig"
        }
    }

    public struct TestTransformerResponse: AWSDecodableShape {
        /// An array where each member of the array includes both the original version and the transformed version of one of the log events that you input.
        public let transformedLogs: [TransformedLogRecord]?

        @inlinable
        public init(transformedLogs: [TransformedLogRecord]? = nil) {
            self.transformedLogs = transformedLogs
        }

        private enum CodingKeys: String, CodingKey {
            case transformedLogs = "transformedLogs"
        }
    }

    public struct TooManyTagsException: AWSErrorShape {
        public let message: String?
        /// The name of the resource.
        public let resourceName: String?

        @inlinable
        public init(message: String? = nil, resourceName: String? = nil) {
            self.message = message
            self.resourceName = resourceName
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case resourceName = "resourceName"
        }
    }

    public struct TransformedLogRecord: AWSDecodableShape {
        /// The original log event message before it was transformed.
        public let eventMessage: String?
        /// The event number.
        public let eventNumber: Int64?
        /// The log event message after being transformed.
        public let transformedEventMessage: String?

        @inlinable
        public init(eventMessage: String? = nil, eventNumber: Int64? = nil, transformedEventMessage: String? = nil) {
            self.eventMessage = eventMessage
            self.eventNumber = eventNumber
            self.transformedEventMessage = transformedEventMessage
        }

        private enum CodingKeys: String, CodingKey {
            case eventMessage = "eventMessage"
            case eventNumber = "eventNumber"
            case transformedEventMessage = "transformedEventMessage"
        }
    }

    public struct TrimString: AWSEncodableShape & AWSDecodableShape {
        /// The array containing the keys of the fields to trim.
        public let withKeys: [String]

        @inlinable
        public init(withKeys: [String]) {
            self.withKeys = withKeys
        }

        public func validate(name: String) throws {
            try self.withKeys.forEach {
                try validate($0, name: "withKeys[]", parent: name, min: 1)
            }
            try self.validate(self.withKeys, name: "withKeys", parent: name, max: 10)
            try self.validate(self.withKeys, name: "withKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case withKeys = "withKeys"
        }
    }

    public struct TypeConverter: AWSEncodableShape & AWSDecodableShape {
        /// An array of TypeConverterEntry objects, where each object contains the information about one field to change the type of.
        public let entries: [TypeConverterEntry]

        @inlinable
        public init(entries: [TypeConverterEntry]) {
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 5)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "entries"
        }
    }

    public struct TypeConverterEntry: AWSEncodableShape & AWSDecodableShape {
        /// The key with the value that is to be converted to a different type.
        public let key: String
        /// The type to convert the field value to. Valid values are integer, double, string and boolean.
        public let type: `Type`

        @inlinable
        public init(key: String, type: `Type`) {
            self.key = key
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case type = "type"
        }
    }

    public struct UntagLogGroupRequest: AWSEncodableShape {
        /// The name of the log group.
        public let logGroupName: String
        /// The tag keys. The corresponding tags are removed from the log group.
        public let tags: [String]

        @inlinable
        public init(logGroupName: String, tags: [String]) {
            self.logGroupName = logGroupName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.tags.forEach {
                try validate($0, name: "tags[]", parent: name, max: 128)
                try validate($0, name: "tags[]", parent: name, min: 1)
                try validate($0, name: "tags[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case tags = "tags"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The ARN of the CloudWatch Logs resource that you're removing tags from. The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name   The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name   For more information about ARN format, see CloudWatch Logs resources and operations.
        public let resourceArn: String
        /// The list of tag keys to remove from the resource.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^[\\w+=/:,.@-]*$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tagKeys = "tagKeys"
        }
    }

    public struct UpdateAnomalyRequest: AWSEncodableShape {
        /// The ARN of the anomaly detector that this operation is to act on.
        public let anomalyDetectorArn: String
        /// If you are suppressing or unsuppressing an anomaly, specify its unique ID here. You can find anomaly IDs by using the ListAnomalies operation.
        public let anomalyId: String?
        /// Set this to true to prevent CloudWatch Logs from displaying this behavior as an anomaly in the future. The behavior is then treated as baseline behavior. However, if similar but more severe occurrences of this behavior occur in the future, those will still be reported as anomalies.  The default is false
        public let baseline: Bool?
        /// If you are suppressing or unsuppressing an pattern, specify its unique ID here. You can find pattern IDs by using the ListAnomalies operation.
        public let patternId: String?
        /// If you are temporarily suppressing an anomaly or pattern, use this structure to specify how long the suppression is to last.
        public let suppressionPeriod: SuppressionPeriod?
        /// Use this to specify whether the suppression to be temporary or infinite. If you specify LIMITED, you must also specify a suppressionPeriod. If you specify INFINITE, any value for suppressionPeriod is ignored.
        public let suppressionType: SuppressionType?

        @inlinable
        public init(anomalyDetectorArn: String, anomalyId: String? = nil, baseline: Bool? = nil, patternId: String? = nil, suppressionPeriod: SuppressionPeriod? = nil, suppressionType: SuppressionType? = nil) {
            self.anomalyDetectorArn = anomalyDetectorArn
            self.anomalyId = anomalyId
            self.baseline = baseline
            self.patternId = patternId
            self.suppressionPeriod = suppressionPeriod
            self.suppressionType = suppressionType
        }

        public func validate(name: String) throws {
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, min: 1)
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.anomalyId, name: "anomalyId", parent: name, max: 36)
            try self.validate(self.anomalyId, name: "anomalyId", parent: name, min: 36)
            try self.validate(self.patternId, name: "patternId", parent: name, max: 32)
            try self.validate(self.patternId, name: "patternId", parent: name, min: 32)
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectorArn = "anomalyDetectorArn"
            case anomalyId = "anomalyId"
            case baseline = "baseline"
            case patternId = "patternId"
            case suppressionPeriod = "suppressionPeriod"
            case suppressionType = "suppressionType"
        }
    }

    public struct UpdateDeliveryConfigurationRequest: AWSEncodableShape {
        /// The field delimiter to use between record fields when the final output format of a delivery is in Plain, W3C, or Raw format.
        public let fieldDelimiter: String?
        /// The ID of the delivery to be updated by this request.
        public let id: String
        /// The list of record fields to be delivered to the destination, in order. If the delivery's log source has mandatory fields, they must be included in this list.
        public let recordFields: [String]?
        /// This structure contains parameters that are valid only when the delivery's delivery destination is an S3 bucket.
        public let s3DeliveryConfiguration: S3DeliveryConfiguration?

        @inlinable
        public init(fieldDelimiter: String? = nil, id: String, recordFields: [String]? = nil, s3DeliveryConfiguration: S3DeliveryConfiguration? = nil) {
            self.fieldDelimiter = fieldDelimiter
            self.id = id
            self.recordFields = recordFields
            self.s3DeliveryConfiguration = s3DeliveryConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.fieldDelimiter, name: "fieldDelimiter", parent: name, max: 5)
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9A-Za-z]+$")
            try self.recordFields?.forEach {
                try validate($0, name: "recordFields[]", parent: name, max: 64)
                try validate($0, name: "recordFields[]", parent: name, min: 1)
            }
            try self.validate(self.recordFields, name: "recordFields", parent: name, max: 128)
            try self.s3DeliveryConfiguration?.validate(name: "\(name).s3DeliveryConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case fieldDelimiter = "fieldDelimiter"
            case id = "id"
            case recordFields = "recordFields"
            case s3DeliveryConfiguration = "s3DeliveryConfiguration"
        }
    }

    public struct UpdateDeliveryConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLogAnomalyDetectorRequest: AWSEncodableShape {
        /// The ARN of the anomaly detector that you want to update.
        public let anomalyDetectorArn: String
        /// The number of days to use as the life cycle of anomalies. After this time, anomalies are automatically baselined and the anomaly detector model will treat new occurrences of similar event as normal. Therefore, if you do not correct the cause of an anomaly during this time, it will be considered normal going forward and will not be detected.
        public let anomalyVisibilityTime: Int64?
        /// Use this parameter to pause or restart the anomaly detector.
        public let enabled: Bool
        /// Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then setting evaluationFrequency to FIFTEEN_MIN might be appropriate.
        public let evaluationFrequency: EvaluationFrequency?
        public let filterPattern: String?

        @inlinable
        public init(anomalyDetectorArn: String, anomalyVisibilityTime: Int64? = nil, enabled: Bool, evaluationFrequency: EvaluationFrequency? = nil, filterPattern: String? = nil) {
            self.anomalyDetectorArn = anomalyDetectorArn
            self.anomalyVisibilityTime = anomalyVisibilityTime
            self.enabled = enabled
            self.evaluationFrequency = evaluationFrequency
            self.filterPattern = filterPattern
        }

        public func validate(name: String) throws {
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, min: 1)
            try self.validate(self.anomalyDetectorArn, name: "anomalyDetectorArn", parent: name, pattern: "^[\\w#+=/:,.@-]*$")
            try self.validate(self.anomalyVisibilityTime, name: "anomalyVisibilityTime", parent: name, max: 90)
            try self.validate(self.anomalyVisibilityTime, name: "anomalyVisibilityTime", parent: name, min: 7)
            try self.validate(self.filterPattern, name: "filterPattern", parent: name, max: 1024)
        }

        private enum CodingKeys: String, CodingKey {
            case anomalyDetectorArn = "anomalyDetectorArn"
            case anomalyVisibilityTime = "anomalyVisibilityTime"
            case enabled = "enabled"
            case evaluationFrequency = "evaluationFrequency"
            case filterPattern = "filterPattern"
        }
    }

    public struct UpperCaseString: AWSEncodableShape & AWSDecodableShape {
        /// The array of containing the keys of the field to convert to uppercase.
        public let withKeys: [String]

        @inlinable
        public init(withKeys: [String]) {
            self.withKeys = withKeys
        }

        public func validate(name: String) throws {
            try self.withKeys.forEach {
                try validate($0, name: "withKeys[]", parent: name, min: 1)
            }
            try self.validate(self.withKeys, name: "withKeys", parent: name, max: 10)
            try self.validate(self.withKeys, name: "withKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case withKeys = "withKeys"
        }
    }

    public struct IntegrationDetails: AWSDecodableShape {
        /// This structure contains complete information about one integration between CloudWatch Logs and OpenSearch Service.
        public let openSearchIntegrationDetails: OpenSearchIntegrationDetails?

        @inlinable
        public init(openSearchIntegrationDetails: OpenSearchIntegrationDetails? = nil) {
            self.openSearchIntegrationDetails = openSearchIntegrationDetails
        }

        private enum CodingKeys: String, CodingKey {
            case openSearchIntegrationDetails = "openSearchIntegrationDetails"
        }
    }

    public struct ResourceConfig: AWSEncodableShape {
        /// This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.
        public let openSearchResourceConfig: OpenSearchResourceConfig?

        @inlinable
        public init(openSearchResourceConfig: OpenSearchResourceConfig? = nil) {
            self.openSearchResourceConfig = openSearchResourceConfig
        }

        public func validate(name: String) throws {
            try self.openSearchResourceConfig?.validate(name: "\(name).openSearchResourceConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case openSearchResourceConfig = "openSearchResourceConfig"
        }
    }
}

// MARK: - Errors

/// Error enum for CloudWatchLogs
public struct CloudWatchLogsErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case dataAlreadyAcceptedException = "DataAlreadyAcceptedException"
        case internalStreamingException = "InternalStreamingException"
        case invalidOperationException = "InvalidOperationException"
        case invalidParameterException = "InvalidParameterException"
        case invalidSequenceTokenException = "InvalidSequenceTokenException"
        case limitExceededException = "LimitExceededException"
        case malformedQueryException = "MalformedQueryException"
        case operationAbortedException = "OperationAbortedException"
        case resourceAlreadyExistsException = "ResourceAlreadyExistsException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case serviceUnavailableException = "ServiceUnavailableException"
        case sessionStreamingException = "SessionStreamingException"
        case sessionTimeoutException = "SessionTimeoutException"
        case throttlingException = "ThrottlingException"
        case tooManyTagsException = "TooManyTagsException"
        case unrecognizedClientException = "UnrecognizedClientException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize CloudWatchLogs
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You don't have sufficient permissions to perform this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// This operation attempted to create a resource that already exists.
    public static var conflictException: Self { .init(.conflictException) }
    /// The event was already logged.   PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException regardless of whether a given batch of log events has already been accepted.
    public static var dataAlreadyAcceptedException: Self { .init(.dataAlreadyAcceptedException) }
    /// An internal error occurred during the streaming of log data. This exception is thrown when there's an issue with the internal streaming mechanism used by the GetLogObject operation.
    public static var internalStreamingException: Self { .init(.internalStreamingException) }
    /// The operation is not valid on the specified resource.
    public static var invalidOperationException: Self { .init(.invalidOperationException) }
    /// A parameter is specified incorrectly.
    public static var invalidParameterException: Self { .init(.invalidParameterException) }
    /// The sequence token is not valid. You can get the correct sequence token in the expectedSequenceToken field in the InvalidSequenceTokenException message.    PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException regardless of receiving an invalid sequence token.
    public static var invalidSequenceTokenException: Self { .init(.invalidSequenceTokenException) }
    /// You have reached the maximum number of resources that can be created.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// The query string is not valid. Details about this error are displayed in a QueryCompileError object. For more information, see QueryCompileError. For more information about valid query syntax, see CloudWatch Logs Insights Query Syntax.
    public static var malformedQueryException: Self { .init(.malformedQueryException) }
    /// Multiple concurrent requests to update the same resource were in conflict.
    public static var operationAbortedException: Self { .init(.operationAbortedException) }
    /// The specified resource already exists.
    public static var resourceAlreadyExistsException: Self { .init(.resourceAlreadyExistsException) }
    /// The specified resource does not exist.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// This request exceeds a service quota.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// The service cannot complete the request.
    public static var serviceUnavailableException: Self { .init(.serviceUnavailableException) }
    /// This exception is returned if an unknown error occurs during a Live Tail session.
    public static var sessionStreamingException: Self { .init(.sessionStreamingException) }
    /// This exception is returned in a Live Tail stream when the Live Tail session times out. Live Tail sessions time out after three hours.
    public static var sessionTimeoutException: Self { .init(.sessionTimeoutException) }
    /// The request was throttled because of quota limits.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// A resource can have no more than 50 tags.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
    /// The most likely cause is an Amazon Web Services access key ID or secret key that's not valid.
    public static var unrecognizedClientException: Self { .init(.unrecognizedClientException) }
    /// One of the parameters for the request is not valid.
    public static var validationException: Self { .init(.validationException) }
}

extension CloudWatchLogsErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "DataAlreadyAcceptedException": CloudWatchLogs.DataAlreadyAcceptedException.self,
        "InvalidSequenceTokenException": CloudWatchLogs.InvalidSequenceTokenException.self,
        "MalformedQueryException": CloudWatchLogs.MalformedQueryException.self,
        "TooManyTagsException": CloudWatchLogs.TooManyTagsException.self
    ]
}

extension CloudWatchLogsErrorType: Equatable {
    public static func == (lhs: CloudWatchLogsErrorType, rhs: CloudWatchLogsErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension CloudWatchLogsErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
